Ejemplo n.º 1
0
    public void SpawnSkill(SkillType skillType, Camp camp, Vector3 pos)
    {
        GameObject go = Game.Instance.ObjectPool.Spawn(skillType.ToString() + "_" + camp.ToString());

        go.transform.position = pos + Vector3.up * 10;
        StartCoroutine(DestroyCoroutine(go.GetComponent <Skill>(), go.GetComponent <Skill>().DelayToDestroy));
    }
Ejemplo n.º 2
0
 protected static int GetAgainstLayerMask(Camp layer)
 {
     if (layer.ToString() == "Player")
     {
         return(LayerMask.GetMask("Enemy"));
     }
     return(LayerMask.GetMask("Player"));
 }
Ejemplo n.º 3
0
    public void SpawnSoldier(Arm arm, Camp camp, Vector3 pos)
    {
        GameObject go = Game.Instance.ObjectPool.Spawn(arm.ToString() + "_" + camp.ToString());

        go.transform.position = pos;
        Soldier soldier = go.GetComponent <Soldier>();

        soldier.HpChanged += Soldier_HpChanged;
        soldier.Dead      += Soldier_Dead;
    }