// Use this for initialization void Start() { ships = new List <GameObject> (); // instantiate a player ship at 0,0 //GameObject addObj = (GameObject)Instantiate (_playerShip); GameObject addObj = (GameObject)Instantiate(Resources.Load("PlayerShip")); ships.Add(addObj); // lock in this instance instance = this; }
protected override bool acquireTarget() { target = PlayerShipMgr.GetNearestShip(transform.position.x, transform.position.y); target.GetComponent <Targetable> ().handleTarget(this); return(base.acquireTarget()); }