25'ten fazla konu seçemezsiniz
Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
Bu depo arşivlendi. Dosyaları görüntüleyebilir ve klonlayabilirsiniz ama işlem gönderemez ve konu/değişiklik isteği açamazsınız.
|
- 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);
- }
- }
- }
|