Esempio n. 1
0
    private void DestroyThis()
    {
        actions.CancelAttack();
        state.RemoveUnit(this.gameObject);
        this.transform.parent = null;
        state.selection.CleanupSelection(this);
        FlagActions flag = null;

        if (GetComponent <SoldierActions> () != null &&
            (flag = GetComponentInChildren <FlagActions> ()) != null)
        {
            flag.getDropped();
            flag.transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z);
        }

        Destroy(this.gameObject);
    }
Esempio n. 2
0
 public void returnFlag()
 {
     flag.getDropped();
     flagIsHome = true;
     flag.transform.position = flagPos;
 }