public override void Added() { base.Added(); //TODO: Check if its on a platformerLevel Level = (PlatformerLevel)Scene; Gravity = Level.Gravity; }
public bool HasState(PlatformerLevel.GameState GameState) { foreach (PlatformerLevel.GameState s in UpdateOnState) { if (s == GameState) return true; } return false; }
//Loads an ogmo file into a platformer level. Specially useful if overrided with extra content. public static Scene autoLoad(string levelName) { PlatformerLevelLoader loader = PlatformerLevelLoader.load(levelName); PlatformerLevel level = new PlatformerLevel(loader.size); level.loadLevel(loader); return level; }
public void UpdateOnlyOnState(PlatformerLevel.GameState GameState) { UpdateOnState = new List<PlatformerLevel.GameState>(); UpdateOnState.Add(GameState); }
public void ClearUpdateStates(PlatformerLevel.GameState GameState) { UpdateOnState = new List<PlatformerLevel.GameState>(); }
public void AddUpdateState(PlatformerLevel.GameState GameState) { if (UpdateOnState==null) UpdateOnState = new List<PlatformerLevel.GameState>(); UpdateOnState.Add(GameState); }
public PlatformLevelEntity(int layerIndex, PlatformerLevel.GameState UpdateState = PlatformerLevel.GameState.Game) : base(layerIndex) { UpdateOnState = new List<PlatformerLevel.GameState>(); UpdateOnState.Add(UpdateState); }