public void LoadClothing(Resource.ResourceManager content) { // apparently when an actor is loaded we need to look // for the most recent [Actor]CLOTHES[Timeblock].ANM file. // So start at the current timeblock and work backwards. Game.Timeblock now = Game.GameManager.CurrentTime; MomResource clothesAnm = null; for (int timeblock = (int)now; timeblock >= 0; timeblock--) { try { string file = _code + "CLOTHES" + Game.GameManager.GetTimeBlockString((Timeblock)timeblock); clothesAnm = content.Load <MomResource>(file); // guess we found it break; } catch (System.IO.FileNotFoundException) { // didn't find it, so keep looking } } if (clothesAnm != null) { clothesAnm.Play(); } }
public static WaitHandle PlayMom(string momFile, bool wait) { _lastMom = SceneManager.SceneContentManager.Load <Game.MomResource>("E" + momFile + ".MOM"); _lastMom.Play(); if (wait) { _waitingOnMom = true; return(_waitHandle); } return(null); }
internal static WaitHandle Add(MomResource anm, bool wait) { anm.ReferenceCount++; add(_anms, anm); if (wait) { return(anm.PlayAndWait()); } anm.Play(); return(null); }