//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!"); } }
//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(); } } }
public override void InfluenceEnvironment(MovementAndMethod.PossibleMovements actionKey) { AttemptToChopATreeAfterCompletedAnimation(); }
public abstract void InfluenceEnvironment(MovementAndMethod.PossibleMovements actionKey);