コード例 #1
0
ファイル: ComboKeysIdentifier.cs プロジェクト: ClementLSW/GGJ
    private void Update()
    {
        if (playerNumber == 1)
        {
            if (Gamepad.all[0].rightShoulder.wasPressedThisFrame && comboHistroy.Count == 0)
            {
                gc.DestroySelectedBuilding();
            }
        }

        if (playerNumber == 2)
        {
            if (Gamepad.all[1].rightShoulder.wasPressedThisFrame && comboHistroy.Count == 0)
            {
                gc.DestroySelectedBuilding();
            }
        }

        if (Gamepad.all[0].leftTrigger.wasPressedThisFrame && playerNumber == 1)
        {
            player1Tooltip.Animate_Pos_ToOpposite();
            tooltipActive = !tooltipActive;
        }

        if (Gamepad.all[1].leftTrigger.wasPressedThisFrame && playerNumber == 2)
        {
            player2Tooltip.Animate_Pos_ToOpposite();
            tooltipActive = !tooltipActive;
        }
    }
コード例 #2
0
ファイル: Base.cs プロジェクト: ClementLSW/GGJ
    private new void Update()
    {
        if (Health <= 0)
        {
            if (PlayerID == 1 && player1Win != null)
            {
                player1Win.Animate_Pos_ToOpposite();
                Destroy(player2Win.gameObject);
            }

            if (PlayerID == 2 && player2Win != null)
            {
                player2Win.Animate_Pos_ToOpposite();
                Destroy(player1Win.gameObject);
            }
        }

        base.Update();
    }
コード例 #3
0
    private IEnumerator AnimateUISet1()
    {
        bottomPanel?.Animate_Pos_ToOpposite();
        yield return(new WaitForSeconds(0.05f));

        leftPanel?.Animate_Pos_ToOpposite();
        yield return(new WaitForSeconds(0.05f));

        rightPanel?.Animate_Pos_ToOpposite();
        yield return(new WaitForSeconds(0.05f));

        centerPanel?.Animate_Pos_ToOpposite();

        foreach (UIAnimator anim in btmBoxesAnim)
        {
            yield return(new WaitForEndOfFrame());

            anim?.Animate_Scale_ToOpposite();
        }

        foreach (UIAnimator anim in leftBoxAnim)
        {
            yield return(new WaitForEndOfFrame());

            anim?.Animate_Scale_ToOpposite();
        }

        foreach (UIAnimator anim in rightBoxAnim)
        {
            yield return(new WaitForEndOfFrame());

            anim?.Animate_Scale_ToOpposite();
        }

        loadingSpinner.CurrRotState = loadingSpinner.CurrRotState ==
                                      UIAnimator.RotationState.RUNNING ? UIAnimator.RotationState.STOPPED : UIAnimator.RotationState.RUNNING;
    }
コード例 #4
0
ファイル: MainMenuAnimator.cs プロジェクト: ClementLSW/GGJ
    private IEnumerator S()
    {
        yield return(new WaitForSeconds(3));

        a.Animate_Pos_ToOpposite();
    }