public override void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { base.SaveSnapshot(snapshotDictionary, force); snapshotDictionary.Set(nameof(movingRight), movingRight); snapshotDictionary.Set(nameof(toFire), toFire); snapshotDictionary.Set(nameof(_alertState), _alertState); }
public virtual void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { // NOTE: behavior for how current/history are stored is ill-defined for templated type T snapshotDictionary.Set(CurrentName, Current, force); snapshotDictionary.Set(HistoryName, History, force); }
public override void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { base.SaveSnapshot(snapshotDictionary, force); snapshotDictionary.Set(nameof(requiredActivatableIDs), string.Join(",", requiredActivatableIDs), force: force); snapshotDictionary.Set(nameof(distance), distance, force: force); snapshotDictionary.Set(nameof(spritePath), spritePath, force: force); }
public virtual void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { prevFlagDestroy = FlagDestroy; snapshotDictionary.Set(GameController.FLAG_DESTROY, FlagDestroy, force, clearFuture: true); snapshotDictionary.Set(nameof(ItemForm), ItemForm, force, clearFuture: true); UpdateShow(); Position.SaveSnapshot(snapshotDictionary, force); }
public override void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { bool clearPositionFuture = false; if (_canClearFuturePosition) { clearPositionFuture = Vector2.Distance(Current, History) > GameController.POSITION_CLEAR_FUTURE_THRESHOLD; } Vector2 temp = Current; snapshotDictionary.Set(CurrentName, temp, force, clearPositionFuture); snapshotDictionary.Set(HistoryName, temp == Vector2.negativeInfinity ? History : temp, force, clearPositionFuture); }
public void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { Position.SaveSnapshot(snapshotDictionary, force); Velocity.SaveSnapshot(snapshotDictionary, force); snapshotDictionary.Set(nameof(ItemID), prevItemID == -2 ? -1 : ItemID, force, clearFuture: true); snapshotDictionary.Set(nameof(Rigidbody.rotation), Rigidbody.rotation, force); snapshotDictionary.Set(nameof(isActivating), isActivating, force); snapshotDictionary.Set(nameof(DidTimeTravel), DidTimeTravel, force); snapshotDictionary.Set(nameof(facingRight), facingRight, force); snapshotDictionary.Set(nameof(isSpriteOrderForced), isSpriteOrderForced, force); //snapshotDictionary[nameof(GetCollisionStateString)] = GetCollisionStateString(); snapshotDictionary.Set(GameController.FLAG_DESTROY, FlagDestroy, force); //NOTE: players should never be in item form, so don't save/load that info here }
public void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { Activated.SaveSnapshot(snapshotDictionary, force); Occupied.SaveSnapshot(snapshotDictionary, force); ActivatedTimeStep.SaveSnapshot(snapshotDictionary, force); Countdown.SaveSnapshot(snapshotDictionary, force); playerID.SaveSnapshot(snapshotDictionary, force); snapshotDictionary.Set(GameController.FLAG_DESTROY, FlagDestroy, force); snapshotDictionary.Set(nameof(ItemForm), ItemForm, force, clearFuture: true); snapshotDictionary.Set(nameof(IsAnimatingOpenClose), IsAnimatingOpenClose); // don't force animations?! snapshotDictionary.Set(nameof(IsAnimatingFold), IsAnimatingFold); snapshotDictionary.Set(nameof(IsAnimatingUnfold), IsAnimatingUnfold); snapshotDictionary.Set(nameof(doneTimeTravelPlayerID), doneTimeTravelPlayerID, force); snapshotDictionary.Set(nameof(isFoldable), isFoldable, force); Position.SaveSnapshot(snapshotDictionary, force); }
public override void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { snapshotDictionary.Set(nameof(timer), timer, force: force, clearFuture: true); }
public override void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { base.SaveSnapshot(snapshotDictionary, force); snapshotDictionary.Set(nameof(destroyStep), destroyStep, force); }
public override void SaveSnapshot(TimeDict.TimeSlice snapshotDictionary, bool force = false) { snapshotDictionary.Set(CurrentName, Current, force); snapshotDictionary.Set(HistoryName, Current == -1 ? History : Current, force); }