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(); }
public void AddMainShot() { if (this.mainShotType == MainShotType.Normal) { this.mainShotType = MainShotType.Three; } else if (this.mainShotType == MainShotType.Three) { this.mainShotType = MainShotType.Five; } }
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; } }