コード例 #1
0
ファイル: Civilian.cs プロジェクト: amulware/ld33
        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;
        }
コード例 #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;
        }
コード例 #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);
    }
コード例 #4
0
 void Awake()
 {
     me = this;
     civiliansInWorld = new List <GameObject> ();
 }