示例#1
0
文件: PNJ.cs 项目: antoinusitos/Aloi
 public void Interact(bool aNewState)
 {
     if (myMovingBackAndForth != null)
     {
         myMovingBackAndForth.SetCanMove(!aNewState);
     }
     if (aNewState)
     {
         myPlayer.GetPlayerUI().ShowDialogue(myTextToSay);
     }
 }
示例#2
0
    private IEnumerator IE_Punch()
    {
        myIsPunching = true;
        myMovingBackAndForth.SetCanMove(false);

        myAnimator.SetTrigger("Attack");

        float timeTaken = myPunchAnimation.length / 1.25f;

        yield return(new WaitForSeconds(timeTaken));

        if (myPlayerTarget != null)
        {
            myPlayerTarget.Removelife(20);
        }

        yield return(new WaitForSeconds(myPunchAnimation.length - timeTaken));

        myMovingBackAndForth.SetCanMove(true);
        myIsPunching = false;
    }
示例#3
0
 public void SetEnemyState(EnemyState aNewState)
 {
     myEnemyState = aNewState;
     if (aNewState == EnemyState.KNOCKED)
     {
         if (myEnemyHitBox != null)
         {
             myEnemyHitBox.StopAttack();
         }
     }
     else
     {
         myMovingBackAndForth.SetCanMove(true);
     }
 }