Example #1
0
    public static void Initialize()
    {
        Player1 = GameObject.Find("Player1");
        Player2 = GameObject.Find("Player2");

        Player1Controller = Player1.GetComponent <PlayerController>();
        Player2Controller = Player2.GetComponent <PlayerController>();

        Players[0] = Player1;
        Players[1] = Player2;

        God           = GameObject.Find("God");
        GodController = God.GetComponent <GodController>();
        GodPride      = GameObject.Find("GroundGod").GetComponent <GodPride>();
    }
Example #2
0
 void OnCollisionEnter(Collision collision)
 {
     if (collision.collider.gameObject.tag == "Temple")
     {
         TempleController dmg = collision.collider.GetComponent <TempleController>();
         dmg.ApplyDamage(damage);
     }
     if (collision.collider.gameObject.tag == "GroundGod")
     {
         GodPride            dmg   = collision.collider.GetComponent <GodPride>();
         GroundGodController addSa = collision.collider.GetComponent <GroundGodController>();
         dmg.ApplyDamage(damage);
         dmg.ApplySpecialAbility(sa);
         addSa.ApplySpecialAbility(sa);
         Debug.Log("");
     }
 }