Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, kannst aber nicht pushen oder Issues/Pull-Requests öffnen.
|
- using UnityEngine;
- using System.Collections;
-
- public class Actor : MonoBehaviour
- {
- protected Action action;
- private bool paused = false;
-
- void Update()
- {
- if (paused || action == null)
- return;
- if (action.isRunning())
- action.step(Time.deltaTime);
- }
-
- public void AttachAction(Action tgtAction)
- {
- action = tgtAction;
- action.setActor(this);
- action.start();
- }
-
- public void StopAction()
- {
- action.stop();
- action = null;
- }
-
- public void PauseAction()
- {
- paused = true;
- }
-
- public void UnpauseAction()
- {
- paused = false;
- }
-
- public void SetTimeScale(float ts)
- {
- if (action is ActionInterval)
- {
- ((ActionInterval)action).setTimeScale(ts);
- }
- }
- }
|