public override Node SetUp_Tree() { Node idling = new Idling(); Node running = new Running(); Node crouching = new Crouching(); Node jumping = new Jumping(); Node falling = new Falling(); Node nonAttacked = Node_Selector.Create(crouching, running, idling, jumping, falling); Node attacked = new Attacked(); return(Node_Selector.Create(attacked, nonAttacked)); }
public MarioEntity(Vector2 location, EventSoundEffects sounds) { Sounds = sounds; WonGame = false; Factory = new MarioFactory(); PowerState = new MarioStandardState(this); ActionState = new Idling(this); Facing = true; Sprite = Factory.MarioSprite(PowerState, ActionState, Facing, location); SpritePosition = location; SpriteVelocity = new Vector2(0, 0); EntityCollision = new MarioCollision(this); Live = 3; }