public GameObject CreateEnemy(string type) { Debug.Log("Creating " + type); enemyToSpawn = null; enemyToSpawn = ObjectPooler.instance.SpawnFromPool(type, Vector3.zero, Quaternion.identity); //check which type if (type == "ExploadingEnemy") { EnemyControllerSTD nullCheck = enemyToSpawn.GetComponent <EnemyControllerSTD>(); if (nullCheck == null) { enemyToSpawn.AddComponent <EnemyControllerSTD>(); } } else if (type == "HeavyEnemy") { HeavyEnemy nullCheck = enemyToSpawn.GetComponent <HeavyEnemy>(); if (nullCheck == null) { enemyToSpawn.AddComponent <HeavyEnemy>(); } } return(enemyToSpawn); }
public HEnemyChase(Enemy myself) { character = (HeavyEnemy)myself; }
public HEnemyAttack(Enemy myself) { character = (HeavyEnemy)myself; characterBody = myself.GetComponent <Rigidbody>(); meleeAttack = myself.basicAttack.gameObject; }
public HEnemyIdle(HeavyEnemy myself) { character = myself; }
public override int GetSpecificsDamages(HeavyEnemy e) { return((int)(0.8 * this.BaseDamage)); }
public HEnemyAttackPrep(Enemy myself) { character = (HeavyEnemy)myself; characterBody = myself.GetComponent <Rigidbody>(); }
public abstract int GetSpecificsDamages(HeavyEnemy e);
public static void TurnOff(HeavyEnemy b) { b.gameObject.SetActive(false); }
public static void TurnOn(HeavyEnemy b) { b.Reset(); b.gameObject.SetActive(true); }
public void ReturnEnemy(HeavyEnemy b) { poolEnemyHeavy.ReturnObject(b); }
public HEnemyWalk(HeavyEnemy myself) { character = myself; }