예제 #1
0
    public void Start()
    {
        this.turnManager = this.gameObject.AddComponent <PunTurnManager>(); //添加组件并赋值
        this.turnManager.TurnManagerListener = this;                        //为监听器赋值,从而触发下面的回调函数来完成游戏逻辑
        this.turnManager.TurnDuration        = 120f;                        //初始化回合持续时间
        Instance = this;

        RefreshUIViews();       //刷新UI视图
    }
예제 #2
0
    public void Start()
    {
        this.turnManager = this.gameObject.AddComponent <PunTurnManager>(); //添加组件并赋值
        this.turnManager.TurnManagerListener = this;                        //为监听器赋值,从而触发下面的回调函数来完成游戏逻辑
        this.turnManager.TurnDuration        = TurnTime;                    //初始化回合持续时间
        if (this.source == null)
        {
            this.source = FindObjectOfType <AudioSource>();
        }
        Instance = this;

        RefreshUIViews();               //刷新UI视图
    }