コード例 #1
0
ファイル: UIFireScript.cs プロジェクト: Makiah/Exploxels
 //Called whenever the specified action (by the dictionary) occurs.
 public override void InfluenceEnvironment(MovementAndMethod.PossibleMovements actionKey)
 {
     if (physicalFireObject != null)
     {
         //Create the object.
         Vector3    physicalFireOffset = new Vector3(1, 0, 0) * CurrentLevelVariableManagement.GetPlayerReference().GetComponent <PlayerAction> ().GetFacingDirection();
         GameObject createdFireObject  = (GameObject)(Instantiate(physicalFireObject, CurrentLevelVariableManagement.GetPlayerReference().transform.position + physicalFireOffset + physicalFireObject.transform.localPosition, Quaternion.identity));
         createdFireObject.GetComponent <PhysicalFireScript> ().OnFireCreated();
         //Used to remove the current item from the hotbar.
         ChangeStackOfCurrentHotbarItem(1);
     }
     else
     {
         Debug.LogError("Physical Fire Object does not exist!");
     }
 }
コード例 #2
0
 //Called by ItemBase.
 public override void InfluenceEnvironment(MovementAndMethod.PossibleMovements actionKey)
 {
     //Ground Pound.
     if (actionKey == MovementAndMethod.PossibleMovements.GroundPound)
     {
         attachedCharacterInput.ExternalJumpAction(4);
         if (attackAfterAnimation)
         {
             attachedCharacterInput.GetActualClass().ActionsOnAttack += GroundPoundEnemy;
         }
         else
         {
             GroundPoundEnemy();
         }
     }
     else if (actionKey == MovementAndMethod.PossibleMovements.AirSlash)
     {
         if (attackAfterAnimation)
         {
             attachedCharacterInput.GetActualClass().ActionsOnAttack += AirSlashEnemy;
         }
         else
         {
             AirSlashEnemy();
         }
     }
     else
     {
         if (attackAfterAnimation)
         {
             attachedCharacterInput.GetActualClass().ActionsOnAttack += AttackEnemyInFocus;
         }
         else
         {
             AttackEnemyInFocus();
         }
     }
 }
コード例 #3
0
 public override void InfluenceEnvironment(MovementAndMethod.PossibleMovements actionKey)
 {
     AttemptToChopATreeAfterCompletedAnimation();
 }
コード例 #4
0
ファイル: Item.cs プロジェクト: Makiah/LavaLab
 public abstract void InfluenceEnvironment(MovementAndMethod.PossibleMovements actionKey);