Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
    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);
    }
Ejemplo n.º 4
0
 void Awake()
 {
     me = this;
     civiliansInWorld = new List <GameObject> ();
 }