示例#1
0
 public override void Added()
 {
     base.Added();
     //TODO: Check if its on a platformerLevel
     Level = (PlatformerLevel)Scene;
     Gravity = Level.Gravity;
 }
示例#2
0
 public bool HasState(PlatformerLevel.GameState GameState)
 {
     foreach (PlatformerLevel.GameState s in UpdateOnState)
     {
         if (s == GameState) return true;
     }
     return false;
 }
示例#3
0
 //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;
 }
示例#4
0
 public void UpdateOnlyOnState(PlatformerLevel.GameState GameState)
 {
     UpdateOnState = new List<PlatformerLevel.GameState>();
     UpdateOnState.Add(GameState);
 }
示例#5
0
 public void ClearUpdateStates(PlatformerLevel.GameState GameState)
 {
     UpdateOnState = new List<PlatformerLevel.GameState>();
 }
示例#6
0
 public void AddUpdateState(PlatformerLevel.GameState GameState)
 {
     if (UpdateOnState==null) UpdateOnState = new List<PlatformerLevel.GameState>();
     UpdateOnState.Add(GameState);
 }
示例#7
0
 public PlatformLevelEntity(int layerIndex, PlatformerLevel.GameState UpdateState = PlatformerLevel.GameState.Game)
     : base(layerIndex)
 {
     UpdateOnState = new List<PlatformerLevel.GameState>();
     UpdateOnState.Add(UpdateState);
 }