public Civilian(GameState game) : base(game) { this.sprite = (Sprite2DGeometry)GeometryManager.Instance.GetSprite("bloob").Geometry; this.controller = new CivilianController(game, this); this.eventListenerTileManager = new GameEventListenerTileManager(game, this); this.initialised = true; }
private void spawnCivilian() { GameObject instance = Instantiate(civilianPrefab); CivilianController controller = instance.GetComponent <CivilianController>(); int startSide = Random.Range(0, 2); controller.pedestrianLight = startSide < 1 ? nearLights: farLights; controller.startSide = startSide; controller.gameController = this; spriteLocations.Add(controller); }
void Awake() { me = this; civiliansInWorld = new List <GameObject> (); }