Ejemplo n.º 1
0
        public Husk(ActorInitializer init, HuskInfo info)
        {
            this.info = info;
            self      = init.Self;

            TopLeft        = init.Get <LocationInit, CPos>();
            CenterPosition = init.Contains <CenterPositionInit>() ? init.Get <CenterPositionInit, WPos>() : init.World.Map.CenterOfCell(TopLeft);
            Facing         = init.Contains <FacingInit>() ? init.Get <FacingInit, int>() : 128;

            dragSpeed     = init.Contains <HuskSpeedInit>() ? init.Get <HuskSpeedInit, int>() : 0;
            finalPosition = init.World.Map.CenterOfCell(TopLeft);
        }
Ejemplo n.º 2
0
        public Husk(ActorInitializer init, HuskInfo info)
        {
            this.info = info;
            self      = init.Self;

            TopLeft        = init.GetValue <LocationInit, CPos>();
            CenterPosition = init.GetValue <CenterPositionInit, WPos>(init.World.Map.CenterOfCell(TopLeft));
            Facing         = init.GetValue <FacingInit, WAngle>(info.GetInitialFacing());

            dragSpeed     = init.GetValue <HuskSpeedInit, int>(0);
            finalPosition = init.World.Map.CenterOfCell(TopLeft);

            effectiveOwner = init.GetValue <EffectiveOwnerInit, Player>(info, self.Owner);
        }