Inheritance: ITraitInfo, IOccupySpaceInfo
コード例 #1
0
ファイル: Immobile.cs プロジェクト: CH4Code/OpenRA
        public Immobile(ActorInitializer init, ImmobileInfo info)
        {
            location = init.Get<LocationInit, CPos>();
            position = init.World.Map.CenterOfCell(location);

            if (info.OccupiesSpace)
                occupied = new[] { Pair.New(TopLeft, SubCell.FullCell) };
            else
                occupied = new Pair<CPos, SubCell>[0];
        }
コード例 #2
0
ファイル: Immobile.cs プロジェクト: cjshmyr/OpenRA
        public Immobile(ActorInitializer init, ImmobileInfo info)
        {
            location = init.Get <LocationInit, CPos>();
            position = init.World.Map.CenterOfCell(location);

            if (info.OccupiesSpace)
            {
                occupied = new[] { Pair.New(TopLeft, SubCell.FullCell) }
            }
            ;
            else
            {
                occupied = new Pair <CPos, SubCell> [0];
            }
        }