Ejemplo n.º 1
0
    private void Update()
    {
        if (Input.GetKeyDown(Surrender))
        {
            if (gameObject.CompareTag("Player"))
            {
                var player1text = TauntManager.GetPlayer1Text();

                player1text.text = "I yield, I yield!";
                player1text.gameObject.SetActive(true);
                SoundManager.PlayCry();
            }
            else
            {
                var player2text = TauntManager.GetPlayer2Text();

                player2text.text = "I yield, I yield!";
                player2text.gameObject.SetActive(true);
                SoundManager.PlayCry();
            }
            TauntManager.instance.StopCoroutine(TauntManager.instance.co);
            SoundManager.PlayWin();
            StartCoroutine(EndScreenIn3());
            return;
        }
    }
Ejemplo n.º 2
0
    private void Start()
    {
        if (instance == null)
        {
            instance = this;
        }

        foreach (Taunt t in taunts)
        {
            player1Taunts.Add(t.Clone());
            player2Taunts.Add(t.Clone());
        }
    }
Ejemplo n.º 3
0
    public static void LoseLimb(int Player)
    {
        SoundManager.PlayBlood();

        if (Player == 1)
        {
            instance.Player1.LimbManager.LoseLimb();
            TauntManager.PlayTaunt(instance.Player2, instance.Player1);
            SoundManager.PlayYellPlayer1();
        }
        else if (Player == 2)
        {
            instance.Player2.LimbManager.LoseLimb();
            TauntManager.PlayTaunt(instance.Player1, instance.Player2);
            SoundManager.PlayYellPlayer2();
        }
        else
        {
            Debug.LogWarning("Player " + Player + " does not exist");
        }
    }
Ejemplo n.º 4
0
    protected override void Awake()
    {
        base.Awake();

        // create states
        CreateState(SpawningState, SpawningEnter, info => {});
        CreateState(IdlingState, IdlingEnter, IdlingExit);
        CreateState(JumpingState, JumpingEnter, info => {});
        CreateState(MovingState, MovingEnter, MovingExit);
        CreateState(FallingState, FallingEnter, FallingExit);
        CreateState(AttackingState, AttackingEnter, info => {});
        CreateState(UltimateState, UltimateEnter, UltimateExit);
        CreateState(DefendingState, DefendingEnter, DefendingExit);
        CreateState(DodgeRollingState, DodgeRollingEnter, DodgeRollingExit);
        CreateState(AirDodgingState, AirDodgingEnter, AirDodgingExit);
        CreateState(FlinchingState, FlinchingEnter, FlinchingExit);
        CreateState(StunState, StunEnter, info => {});
        CreateState(DyingState, info => {}, info => {});

        initialState = SpawningState;

        myStats.Initialize(playerInfo.username);

        // combat
        attackManager = GetComponent<AttackManager>();
        attackManager.Initialize(this);
        comboManager = GetComponent<ComboManager>();
        comboManager.Initialize(this);
        tauntManager = GetComponent<TauntManager>();
        ultimateManager = GetComponent<UltimateAttackManager>();
        shieldHealth = (int)myStats.defenseShield.value;
        myMagic = GetComponent<Magic>();
        myMagic.Initialize(myStats);
        shieldRegen = new Job(RegenShield(), false);
    }