public void ResumePlaceableAnimations() { GameObject[] placeables = GameObject.FindGameObjectsWithTag("placeable"); foreach (var placeable in placeables) { AnimatedObject animatedObject = placeable.GetComponent <AnimatedObject> (); animatedObject.ResumeAnimation(); } animationStatus = LevelAnimationStatus.RUNNING; }
public void StopPlaceableAnimations() { GameObject[] placeables = GameObject.FindGameObjectsWithTag("placeable"); foreach (var placeable in placeables) { AnimatedObject animatedObject = placeable.GetComponent <AnimatedObject> (); animatedObject.StopAnimationAndReset(); } animationStatus = LevelAnimationStatus.STOPPED_OR_NONE; }
public void PausePlaceableAnimations() { GameObject[] placeables = GameObject.FindGameObjectsWithTag("placeable"); foreach (var placeable in placeables) { AnimatedObject animatedObject = placeable.GetComponent <AnimatedObject> (); animatedObject.PauseAnimation(); } animationStatus = LevelAnimationStatus.PAUSED; }
public void StartPlaceableAnimations() { GameObject[] placeables = GameObject.FindGameObjectsWithTag("placeable"); foreach (var placeable in placeables) { AnimatedObject animatedObject = placeable.GetComponent <AnimatedObject> (); // if (animatedObject == null){ // animatedObject = placeable.AddComponent<AnimatedObject> (); // animatedObject.SetData (placeable.GetComponent<Placeable> ().pData.AnimationData); // } animatedObject.StartAnimation(); } animationStatus = LevelAnimationStatus.RUNNING; }