public Action(ActionRaw actionRaw) { this._params = actionRaw.parameters; this._target = Global.GetItem(_params.target); this._name = actionRaw.name; this._return_code = actionRaw.return_code; this._action = ActionsManager.GetActionType(actionRaw.name); }
public override void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null) { if (Global.curInstanceObject == Global.getFlag("globalInstance")) { return; } UnityEngine.Object.Destroy(GameObject.Find("globalInstance")); int curId = Global.getFlag("globalInstance"); Global.curInstanceObject = curId; String name = Global.m_instanceMap[curId]; gameObject = UnityEngine.Object.Instantiate(Global.GetItem(name)); gameObject.transform.parent = GameObject.Find("Main Camera").transform.GetChild(0); gameObject.transform.localPosition = new Vector3(-1.86f, 3.1f, 1.94f); gameObject.transform.localScale = new Vector3(1, 1, 1); gameObject.transform.eulerAngles = new Vector3(40, 150, 10); gameObject.AddComponent <Rotate> (); gameObject.name = "globalInstance"; gameObject.GetComponent <MeshRenderer>().shadowCastingMode = ShadowCastingMode.Off; }
public override void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null) { GameObject screen = Global.GetItem("Screen"); screen.GetComponent <Slide>().SlideIn(); }
public override void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null) { gameObject.SetActive(false); }
public override void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null) { gameObject.transform.Rotate(0, 0, 30 * Time.deltaTime, Space.World); }
public abstract void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null);