Пример #1
0
    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);
    }
Пример #2
0
 public HEnemyChase(Enemy myself)
 {
     character = (HeavyEnemy)myself;
 }
Пример #3
0
 public HEnemyAttack(Enemy myself)
 {
     character     = (HeavyEnemy)myself;
     characterBody = myself.GetComponent <Rigidbody>();
     meleeAttack   = myself.basicAttack.gameObject;
 }
Пример #4
0
 public HEnemyIdle(HeavyEnemy myself)
 {
     character = myself;
 }
Пример #5
0
 public override int GetSpecificsDamages(HeavyEnemy e)
 {
     return((int)(0.8 * this.BaseDamage));
 }
Пример #6
0
 public HEnemyAttackPrep(Enemy myself)
 {
     character     = (HeavyEnemy)myself;
     characterBody = myself.GetComponent <Rigidbody>();
 }
Пример #7
0
 public abstract int GetSpecificsDamages(HeavyEnemy e);
Пример #8
0
 public static void TurnOff(HeavyEnemy b)
 {
     b.gameObject.SetActive(false);
 }
Пример #9
0
 public static void TurnOn(HeavyEnemy b)
 {
     b.Reset();
     b.gameObject.SetActive(true);
 }
Пример #10
0
 public void ReturnEnemy(HeavyEnemy b)
 {
     poolEnemyHeavy.ReturnObject(b);
 }
Пример #11
0
 public HEnemyWalk(HeavyEnemy myself)
 {
     character = myself;
 }