예제 #1
0
    //Merge a certain num of souls from this soul to soul s
    public bool MergeTo(Soul s, int num)
    {
        if (!s)
        {
            return(false);
        }

        //Unit u=(Unit)s.GetComponent("Unit");

        s.AddSouls(num);
        this.RemoveSouls(num);

        return(true);
    }
예제 #2
0
    //called when the host is selected and valid tile is selected
    override public bool SelectValidTile(Tile t)
    {
        Soul s = (Soul)t.Resident.GetComponent("Soul");
        Unit u = (Unit)t.Resident.GetComponent("Unit");

        SoulHost sh = (SoulHost)t.Resident.GetComponent("SoulHost");

        if (u.Player != GM.PlayerMan.CurrTurn)
        {
            sh.Stun();
            //s.RemoveSouls(1);
        }
        else
        {
            s.AddSouls(1);
        }

        t.audio.PlayOneShot(t.DigNoise);

        Instantiate(Resources.Load("Prefabs/TurretBulletExplosion"), t.transform.position, t.transform.rotation);

        Use();
        return(true);
    }