public EnShip makeShip(Space spawn, int size) { EnShip evil = fleet[shipCount] = Instantiate <EnShip>(enShipPrefab); shipCount++; evil.transform.SetParent(transform, false); evil.transform.localPosition = transform.position; evil.transform.position = spawn.getPos(); //spawn.toggleHostile(); evil.x = spawn.x; evil.y = spawn.y; switch (size) { case 1: evil.title = "Baddie"; evil.StartUp(4, 1, 1, 2, "Skiff"); break; case 2: evil.title = "Meanie"; evil.StartUp(4, 1, 1, 2, "Barge"); break; default: Debug.Log("Hostile Ship Error"); break; } return(evil); }
public void battleStart(GameObject oldCam, ShipBehaviour ally, EnShip enemy) { cam = oldCam; dead = enemy; alive = ally; cam.transform.position = on; a1.changeText(ally.title); a2.changeText(ally.desc); e1.changeText(enemy.title); e2.changeText(enemy.desc); }