コード例 #1
0
ファイル: SafetyAreaManager.cs プロジェクト: Skodeva/SDK4
 private void Release()
 {
     OnFinishSetSafeArea?.Invoke();
     if (safetyAreaMono != null)
     {
         safetyAreaMono.Release();
         GameObject.Destroy(safetyAreaGameObject);
         safetyAreaMono = null;
     }
 }
コード例 #2
0
ファイル: SafetyAreaManager.cs プロジェクト: Skodeva/SDK4
 private void InitSafetyAreaMono()
 {
     if (safetyAreaMono == null)
     {
         GameObject safetyAreaMonoResource = Resources.Load <GameObject>("SafetyAreaMono");
         safetyAreaGameObject = GameObject.Instantiate(safetyAreaMonoResource);
         safetyAreaMono       = safetyAreaGameObject.GetComponent <SafetyAreaMono>();
     }
     safetyAreaMono.Init();
 }
コード例 #3
0
    public void InitStateMachine(SafetyAreaMono safetyAreaMono)
    {
        if (playAreaStateDic == null)
        {
            playAreaStateDic = new Dictionary <PlayAreaStateEnum, AbstractPlayAreaState <SafetyAreaMono> >();
            playAreaStateDic.Add(PlayAreaStateEnum.WaitingDraw, new PrepareDrawPlayAreaState());
            playAreaStateDic.Add(PlayAreaStateEnum.OK, new PlayAreaOKState());
            playAreaStateDic.Add(PlayAreaStateEnum.NotEnough, new PlayAreaNotEnoughState());

            foreach (AbstractPlayAreaState <SafetyAreaMono> valueItem in playAreaStateDic.Values)
            {
                valueItem.Init(safetyAreaMono);
            }
        }
    }