Esempio n. 1
0
        public EntityPlayer()
            : base()
        {
            this.textureLoader = TextureLoader.GetInstance();
            this.logger.Debug(this.GetType().ToString() + " is create");

            this.Life = 3;
            this.MaxLife = 3;

            this.bomCount = 1;

            this.position.PosX = SSGame.GetInstance().GetBattleWindowSize().Width / 2;
            this.position.PosY = SSGame.GetInstance().GetBattleWindowSize().Height - 100;

            this.textureLoader.LoadSprite("ora.png", 512 / 20, 256 / 20, 1, 20, 20);

            this.mainShotType = MainShotType.Normal;
            this.subShotType = SubShotType.None;

            this.collider = new collid.CircleCollider(this.GetType(), typeof(Bom), typeof(PlayerCircleShot));
            this.collider.Radius = this.GetRadius();
        }
Esempio n. 2
0
        public override void OnInteract(collid.CollitionInfo info)
        {
            if (typeof(Item).IsAssignableFrom(info.CollitionObjectType))
                return;

            if (!this.isDeathTime)
            {
                this.Life--;

                this.mainShotType = MainShotType.Normal;
                this.subShotType = SubShotType.None;
                this.power = 0;
                this.bomCount = 1;

                this.isDeathTime = true;

                DX.PlaySoundMem(SoundLoader.GetInstance().Sounds["death.mp3"], DX.DX_PLAYTYPE_BACK);

                this.position.PosX = SSGame.GetInstance().GetBattleWindowSize().Width / 2;
                this.position.PosY = SSGame.GetInstance().GetBattleWindowSize().Height;

            }
        }
Esempio n. 3
0
 public void AddSubShot()
 {
     if (this.subShotType == SubShotType.None)
     {
         this.subShotType = SubShotType.Side;
     }
 }