小编ipe*_*nal的帖子

Unity Array of Struct:当设置其中一个数组下标的变量时,它会为所有数组下标设置它

这是我创建的结构.

public struct Bar
{

    private static float deltaTime = 1.0f;
    private static bool AutoRun = false;
    private static bool AutoRunBought = false;
    private static bool Start = false;


    // DELTA TIME
    public float GetDeltaTime()
    {
        return deltaTime;
    }
    public void SetDeltaTime(float _dt)
    {
        deltaTime = _dt;
    }
    public void IncrementDeltaTime(float _deltaIn)
    {
        deltaTime += _deltaIn;
    }
    public void DecrementDeltaTime(float _deltaIn)
    {
        deltaTime -= _deltaIn;
    }

    // AUTO RUN
    public bool GetAutoRun()
    {
        return AutoRun;
    }
    public void SetAutoRun(bool _autoBought) …
Run Code Online (Sandbox Code Playgroud)

c# arrays struct button unity-game-engine

1
推荐指数
1
解决办法
413
查看次数

标签 统计

arrays ×1

button ×1

c# ×1

struct ×1

unity-game-engine ×1