示例#1
0
 private void TurnSpeedParticles()
 {
     if (!isParticlesTurnedOn)
     {
         GoToNextLevel?.Invoke();
         isParticlesTurnedOn = true;
     }
 }
    public void OnPointerUp(PointerEventData eventData)
    {
        switch (playerAction)
        {
        case PlayerAction.Move:
            if (PlayerInput.Instance.cityPlayer.State == CharaAvatar.CharacterState.WaitForAction)
            {
                Move?.Invoke();
            }
            break;

        case PlayerAction.Harvest:
            if (PlayerInput.Instance.cityPlayer.State == CharaAvatar.CharacterState.WaitForAction)
            {
                Harvest?.Invoke();
            }
            break;

        case PlayerAction.Pass:
            if (PlayerInput.Instance.cityPlayer.State == CharaAvatar.CharacterState.WaitForAction)
            {
                Pass?.Invoke();
            }
            break;

        case PlayerAction.Vote:
            if (PlayerInput.Instance.cityPlayer.State == CharaAvatar.CharacterState.WaitForAction)
            {
                Vote?.Invoke();
            }
            break;

        case PlayerAction.PassDurigMove:
            if (PlayerInput.Instance.cityPlayer.State == CharaAvatar.CharacterState.WaitForMoving)
            {
                PassDurigMove?.Invoke();
            }
            break;

        case PlayerAction.ReturnMenu:
            ReturnMenu?.Invoke();
            break;

        case PlayerAction.GoToNextLevel:
            GoToNextLevel?.Invoke();
            break;

        case PlayerAction.ReloadTheSameLevel:
            ReloadTheSameLevel?.Invoke();
            break;
        }
    }