コード例 #1
0
        public override void Create(Fighter fighter)
        {
            MyFighter myFighter = fighter as MyFighter;

            if (!myFighter.BSuperFight)
            {
                SpeedTypeAttr = SpeedType.Level2;
                PowerTypeAttr = PowerLevel.Level2;
            }
            else
            {
                SpeedTypeAttr = SpeedType.Level3;
                PowerTypeAttr = PowerLevel.Level4;
            }
            if (_thread == null)
            {
                _thread = new Thread(ThreadCallBack);
                _thread.Start();
            }
        }
コード例 #2
0
        public static Layout GetMyBulletLayout(Fighter fighter)
        {
            MyFighter myFighter = fighter as MyFighter;
            Layout    layout    = new Layout();

            switch (myFighter.BSuperFight)
            {
            case true:
                layout.X      = fighter.LayoutAttr.X / 2 - Common.MY_NORMAL_BULLET_SIZE.Width / 2;
                layout.Y      = fighter.LayoutAttr.EdgePointAttr.ButtomPoint.Y + 2;
                layout.Width  = Common.MY_NORMAL_BULLET_SIZE.Width;
                layout.Height = Common.MY_NORMAL_BULLET_SIZE.Height;
                break;

            case false:
                layout.X      = fighter.LayoutAttr.X / 2 - Common.MY_SUPER_BULLET_SIZE.Width / 2;
                layout.Y      = fighter.LayoutAttr.EdgePointAttr.ButtomPoint.Y + 2;
                layout.Width  = Common.MY_SUPER_BULLET_SIZE.Width;
                layout.Height = Common.MY_SUPER_BULLET_SIZE.Height;
                break;
            }
            return(layout);
        }
コード例 #3
0
 static MyFighter()
 {
     _instance = new MyFighter();
 }