public Particle( IParent parent, string textureId, float LifeTime, Color color, World world, Vector2 position = new Vector2(), bool collidable = false, float layerDepth = 0.5f) : base(parent: parent, position: position, collidable: collidable) { this.TextureId = textureId; this.LifeTime = LifeTime; this.Color = color; this._parent = parent; LayerDepth = layerDepth; if (collidable) { MovableBehaviour = new MovableBehaviour(this); } LastFrameBounds = Bounds; }
public Character(IParent parent, ISpawn spawn = null) : base(parent) { Spawn = spawn; MovableBehaviour = new MovableBehaviour(); _onDieListeners = new List<Delegate>(); _colorBehaviour = new ColorBehaviour(this); WalkingAcceleration = 15; WalkingSpeed = 40; jumpPower = 42; }
public override void Initialize() { base.Initialize(); Direction = Direction; OriginalPosition = Position; MovableBehaviour = new MovableBehaviour(this); _collisionWith = new Dictionary<Character, Collision>(); }