StartWorkingWhithDoors
This commit is contained in:
parent
0ff736e29d
commit
2e467120c5
2 changed files with 46 additions and 1 deletions
37
DangerousD/GameCore/GameObjects/Entities/Door.cs
Normal file
37
DangerousD/GameCore/GameObjects/Entities/Door.cs
Normal file
|
@ -0,0 +1,37 @@
|
|||
using DangerousD.GameCore.GameObjects.LivingEntities;
|
||||
using DangerousD.GameCore.Graphics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DangerousD.GameCore.GameObjects.Entities
|
||||
{
|
||||
public class Door : Entity
|
||||
{
|
||||
public Door(Vector2 position) : base(position)
|
||||
{
|
||||
}
|
||||
|
||||
protected override GraphicsComponent GraphicsComponent { get; } = new(new List<string> { "SilasBallMove" }, "SilasBallMove");
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
base.Update(gameTime);
|
||||
|
||||
}
|
||||
public override void OnCollision(GameObject gameObject)
|
||||
{
|
||||
base.OnCollision(gameObject);
|
||||
if (gameObject is Player)
|
||||
{
|
||||
Player player = (Player)gameObject;
|
||||
if (player.isUping)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -31,7 +31,7 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
public bool isInvincible;
|
||||
private int bullets;
|
||||
public bool FallingThroughPlatform = false;
|
||||
|
||||
public bool isUping = false;
|
||||
|
||||
|
||||
|
||||
|
@ -162,6 +162,14 @@ namespace DangerousD.GameCore.GameObjects.LivingEntities
|
|||
}
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
if (AppManager.Instance.InputManager.ScopeState==ScopeState.Up)
|
||||
{
|
||||
isUping = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
isUping = false;
|
||||
}
|
||||
if (isOnGround && FallingThroughPlatform)
|
||||
{
|
||||
FallingThroughPlatform = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue