상속: 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];
            }
        }