コード例 #1
0
ファイル: Avatar.cs プロジェクト: satwinders97/MyProjects
        private void Init(IAvatarPowerState state, IAvatarVerticalState action, IAvatarHorizontalState orientation)
        {
            TextureType            = typeof(Avatar);
            CollisionBox.ColorType = typeof(Avatar);

            PowerState      = state;
            VerticalState   = action;
            HorizontalState = orientation;

            Sprite = new AvatarSprite(this);
        }
コード例 #2
0
        public void Execute()
        {
            IAvatarPowerState oldPower = receiver.Level.Avatar.PowerState;

            receiver.LoadGameLevel(warp.Level);
            if (warp.X != null && warp.Y != null)
            {
                receiver.Level.Avatar.Position    = new Vector2((float)warp.X * 16, (float)warp.Y * 16);
                receiver.Level.CheckpointPosition = new Vector2((float)warp.X * 16, (float)warp.Y * 16);
            }
            receiver.Level.Avatar.PowerState = oldPower;
        }
コード例 #3
0
ファイル: Avatar.cs プロジェクト: satwinders97/MyProjects
 public Avatar(TileMap level, Vector2 initPos, IAvatarPowerState state, IAvatarVerticalState action, IAvatarHorizontalState orientation) : base(level, initPos)
 {
     Init(state, action, orientation);
 }