Esempio n. 1
0
 void Awake()
 {
     Processable.BulletMLManager.Init(new BulletFunctions());
     b2wayLeftBulletTask  = BulletRunner.ConvertBulletmlTaskOption(FsBulletML.Bullets.PlayerBullet.PlayerBullet.b2wayLeftBullet);
     b2wayRightBulletTask = BulletRunner.ConvertBulletmlTaskOption(FsBulletML.Bullets.PlayerBullet.PlayerBullet.b2wayRightBullet);
     hommingTask          = BulletRunner.ConvertBulletmlTaskOption(FsBulletML.Bullets.PlayerBullet.PlayerBullet.homing);
 }
Esempio n. 2
0
        private void Shoot2WayLeftBullet()
        {
            var task = BulletRunner.ConvertBulletmlTaskOption(Player.b2wayLeftBullet);

            if (this.Timer > 0)
            {
                var bullet = new PlayerBullet();
                Manager.AddPlayerBulletPos(bullet, new Vector2(this.Pos.X - 10, this.Pos.Y + 1));
                bullet.SetTask(task);
            }
        }
Esempio n. 3
0
        private void ShootHomingBullet()
        {
            var task = BulletRunner.ConvertBulletmlTaskOption(Player.homing);

            if (this.Timer > 60)
            {
                var bullet = new PlayerBullet();
                Manager.AddPlayerBulletPos(bullet, this.Pos);
                bullet.SetTask(task);
            }
        }
Esempio n. 4
0
    protected void RunTask()
    {
        var self = this as FsBulletML.Processable.IBulletmlObject;

        Monad.OptionExtentions.Action <Processable.BulletmlTask>(self.Task,
                                                                 x =>
        {
            var result = BulletRunner.Run(this);
            self.X     = self.X + (result.X / 100);
            self.Y     = self.Y - (result.Y / 100);
            var angle  = -(self.Dir) * Mathf.Rad2Deg;
            this.transform.rotation = Quaternion.AngleAxis(angle, new Vector3(0, 0, 1));

            if (result.Processed)
            {
                x.Init();
            }
            return;
        },
                                                                 _ =>
        {
            return;
        });
    }