示例#1
0
 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);
 }
示例#2
0
        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;
        }
示例#3
0
        public override void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null)
        {
            GameObject screen = Global.GetItem("Screen");

            screen.GetComponent <Slide>().SlideIn();
        }
示例#4
0
 public override void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null)
 {
     gameObject.SetActive(false);
 }
示例#5
0
 public override void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null)
 {
     gameObject.transform.Rotate(0, 0, 30 * Time.deltaTime, Space.World);
 }
示例#6
0
 public abstract void DoAction(GameObject gameObject, ParamsRaw paramsRaw = null);