public Material(SceneRenderer scene, IDrawableModel model, Vector2 maxSpeed) : base(scene, model, maxSpeed, true, true) { _visible = true; _startStaircase = false; _climbStaircase = false; _finishStaircase = false; }
public Character(OcTree octree, IDrawableModel model, Vector2 maxSpeed, int maxLife, int attack) : base(octree, model, maxSpeed, true, true) { _life = maxLife; _maxLife = maxLife; _attack = attack; }
/// <summary> /// Unload all needed content of the <c>MoveableObject</c>. /// </summary> public virtual void Unload() { _correctPosition = Vector3.Zero; Speed = Vector2.Zero; MaxSpeed = Vector2.Zero; _model.Unload(); _model = null; _scene = null; }
/// <summary> /// Constructor of the <c>MoveableObject</c> class. /// </summary> /// <param name="scene">Reference to the scene where the character moves.</param> /// <param name="model">Reference to the model that represents the object.</param> /// <param name="maxSpeed">Max speed of the character.</param> /// <param name="checkGravity">true if it is necessary to check gravity, false otherwise.</param> /// <param name="checkCollision">true if it is necessary to check collisions, false otherwise.</param> public MoveableObject(SceneRenderer scene, IDrawableModel model, Vector2 maxSpeed, bool checkGravity = true, bool checkCollision = true) { _scene = scene; _model = model; _speed = new Vector2(0.1f, 0.1f);//Vector2.Zero; _maxSpeed = maxSpeed; _correctPosition = _model.Position; _checkGravity = checkGravity; _checkCollision = checkCollision; }
public MoveableObject(OcTree octree, IDrawableModel model, Vector2 maxSpeed, bool checkGravity = true, bool checkCollision = true) { _octree = octree; _model = model; _speed = new Vector2(0.1f, 0.1f); _maxSpeed = maxSpeed; _correctPosition = _model.Position; _checkGravity = checkGravity; _checkCollision = checkCollision; }
/// <summary> /// Constructor of the <c>Character</c> class. /// </summary> /// <param name="scene">Reference to the scene where the character moves.</param> /// <param name="model">Reference to the model that represents the character.</param> /// <param name="maxSpeed">Max speed of the character.</param> /// <param name="maxLife">Max life of the character.</param> /// <param name="attack">Attack of the character.</param> public Character(SceneRenderer scene, IDrawableModel model, Vector2 maxSpeed, int maxLife, int life, int attack) : base(scene, model, maxSpeed, true, true) { _visible = true; _life = life; _maxLife = maxLife; _attack = attack; _startStaircase = false; _climbStaircase = false; _finishStaircase = false; _startDownStaircase = false; _climbDownStaircase = false; _finishDownStaircase = false; _lastPlayerXDirection = XDirection.Right; _playerXDirection = XDirection.Right; _lastPlayerYDirection = YDirection.None; _playerYDirection = YDirection.None; }
public StartRenderer(IDrawableModel playButton) { this.playButton = playButton; tHelper = TextureHelper.GetInstance(); }