// Start is called befsore the first frame update void Start() { spline_Move = GameObject.FindGameObjectWithTag("Player").GetComponent <SWS.splineMove>(); ItemBox.GetComponent <Item_Box>(); // if(box_rotate.state == false) // this.gameObject.SetActive(true); }
void Start() { timer = 0.0f; State = false; spline_Move = GameObject.FindGameObjectWithTag("Player").GetComponent <SWS.splineMove>(); Item_Box = FindObjectOfType <Item_Box>(); }
static int Pause(IntPtr L) { try { int count = LuaDLL.lua_gettop(L); if (count == 1) { SWS.splineMove obj = (SWS.splineMove)ToLua.CheckObject <SWS.splineMove>(L, 1); obj.Pause(); return(0); } else if (count == 2) { SWS.splineMove obj = (SWS.splineMove)ToLua.CheckObject <SWS.splineMove>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.Pause(arg0); return(0); } else { return(LuaDLL.luaL_throw(L, "invalid arguments to method: SWS.splineMove.Pause")); } } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
//get references at start //initialize movement but don't start it yet void Start() { animator = GetComponent<Animator>(); move = GetComponent<splineMove>(); move.StartMove(); move.Pause(); progress = 0f; }
//getting component references void Start() { animator = GetComponentInChildren <Animator>(); sMove = GetComponent <splineMove>(); if (!sMove) { nAgent = GetComponent <NavMeshAgent>(); } }
void Start() { if (PhotonNetwork.LocalPlayer.NickName == "Player_1") { Animator_Player = GameObject.Find("avatar1").GetComponent <Animator>(); spline_move = GameObject.Find("avatar1").GetComponent <SWS.splineMove>(); } else if (PhotonNetwork.LocalPlayer.NickName == "Player_2") { Animator_Player = GameObject.Find("avatar2").GetComponent <Animator>(); spline_move = GameObject.Find("avatar2").GetComponent <SWS.splineMove>(); } AttributeObj_Space = GameObject.Find("Attribute_Space"); AttributeObj_Fire = GameObject.Find("Attribute_Fire"); AttributeObj_Peace = GameObject.Find("Attribute_Peace"); AttributeObj_Forest = GameObject.Find("Attribute_Forest"); AttributeObj_Space.SetActive(false); AttributeObj_Fire.SetActive(false); AttributeObj_Peace.SetActive(false); AttributeObj_Forest.SetActive(false); Item1 = FindObjectOfType <ItemEffet>(); Item2 = FindObjectOfType <ItemEffet>(); Item3 = FindObjectOfType <ItemEffet>(); Rand_Item = Random.Range(1, 4); Rand_Attribute = Random.Range(1, 5); switch (Rand_Attribute) { case (int)ATTRIBUTE.eSpace: AttributeObj_Space.SetActive(true); AttributeFunc_Space(); break; case (int)ATTRIBUTE.eFire: AttributeObj_Fire.SetActive(true); AttributeFunc_Fire(); break; case (int)ATTRIBUTE.ePeace: AttributeObj_Peace.SetActive(true); AttributeFunc_Peace(); break; case (int)ATTRIBUTE.eForest: AttributeObj_Forest.SetActive(true); AttributeFunc_Forest(); break; } }
void Start() { if (PhotonNetwork.LocalPlayer.NickName == "Player_1") { spline_move = GameObject.Find("avatar1").GetComponent <SWS.splineMove>(); Player_animator = GameObject.Find("avatar1").GetComponent <Animator>(); } else if (PhotonNetwork.LocalPlayer.NickName == "Player_2") { spline_move = GameObject.Find("avatar2").GetComponent <SWS.splineMove>(); Player_animator = GameObject.Find("avatar2").GetComponent <Animator>(); } }
static int StartMove(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); SWS.splineMove obj = (SWS.splineMove)ToLua.CheckObject <SWS.splineMove>(L, 1); obj.StartMove(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int SetPath(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); SWS.splineMove obj = (SWS.splineMove)ToLua.CheckObject <SWS.splineMove>(L, 1); SWS.PathManager arg0 = (SWS.PathManager)ToLua.CheckObject <SWS.PathManager>(L, 2); obj.SetPath(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void Start() { if (PhotonNetwork.LocalPlayer.NickName == "Player_1") { spline_move = GameObject.Find("avatar1").GetComponent <SWS.splineMove>(); spline_move.WayPointUpdate = false; } else if (PhotonNetwork.LocalPlayer.NickName == "Player_2") { spline_move = GameObject.Find("avatar2").GetComponent <SWS.splineMove>(); spline_move.WayPointUpdate = false; } fTime = 0.0f; }
static int ChangeSpeed(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); SWS.splineMove obj = (SWS.splineMove)ToLua.CheckObject <SWS.splineMove>(L, 1); float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.ChangeSpeed(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
static int GoToWaypoint(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); SWS.splineMove obj = (SWS.splineMove)ToLua.CheckObject <SWS.splineMove>(L, 1); int arg0 = (int)LuaDLL.luaL_checknumber(L, 2); obj.GoToWaypoint(arg0); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void Awake() { Animator_Player = GameObject.Find("avatar1").GetComponent <Animator>(); AttributeObj_Space = GameObject.Find("Attribute_Space"); AttributeObj_Fire = GameObject.Find("Attribute_Fire"); AttributeObj_Peace = GameObject.Find("Attribute_Peace"); AttributeObj_Forest = GameObject.Find("Attribute_Forest"); spline_move = GameObject.Find("avatar1").GetComponent <SWS.splineMove>(); AttributeObj_Space.SetActive(false); AttributeObj_Fire.SetActive(false); AttributeObj_Peace.SetActive(false); AttributeObj_Forest.SetActive(false); }
static int set_pathType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; DG.Tweening.PathType arg0 = (DG.Tweening.PathType)ToLua.CheckObject(L, 2, typeof(DG.Tweening.PathType)); obj.pathType = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index pathType on a nil value")); } }
static int set_events(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; System.Collections.Generic.List <UnityEngine.Events.UnityEvent> arg0 = (System.Collections.Generic.List <UnityEngine.Events.UnityEvent>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <UnityEngine.Events.UnityEvent>)); obj.events = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index events on a nil value")); } }
static int set_waypoints(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; UnityEngine.Vector3[] arg0 = ToLua.CheckStructArray <UnityEngine.Vector3>(L, 2); obj.waypoints = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index waypoints on a nil value")); } }
static int set_animEaseType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; UnityEngine.AnimationCurve arg0 = (UnityEngine.AnimationCurve)ToLua.CheckObject <UnityEngine.AnimationCurve>(L, 2); obj.animEaseType = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index animEaseType on a nil value")); } }
static int get_animEaseType(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; UnityEngine.AnimationCurve ret = obj.animEaseType; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index animEaseType on a nil value")); } }
static int set_timeValue(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; SWS.splineMove.TimeValue arg0 = (SWS.splineMove.TimeValue)ToLua.CheckObject(L, 2, typeof(SWS.splineMove.TimeValue)); obj.timeValue = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index timeValue on a nil value")); } }
static int get_lockRotation(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; DG.Tweening.AxisConstraint ret = obj.lockRotation; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index lockRotation on a nil value")); } }
static int get_waypoints(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; UnityEngine.Vector3[] ret = obj.waypoints; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index waypoints on a nil value")); } }
static int get_tween(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; DG.Tweening.Tweener ret = obj.tween; ToLua.PushObject(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index tween on a nil value")); } }
static int get_rotationTarget(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; UnityEngine.Transform ret = obj.rotationTarget; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index rotationTarget on a nil value")); } }
static int get_waypointRotation(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; SWS.splineMove.RotationType ret = obj.waypointRotation; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index waypointRotation on a nil value")); } }
static int set_local(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; bool arg0 = LuaDLL.luaL_checkboolean(L, 2); obj.local = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index local on a nil value")); } }
static int set_pathContainer(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; SWS.PathManager arg0 = (SWS.PathManager)ToLua.CheckObject <SWS.PathManager>(L, 2); obj.pathContainer = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index pathContainer on a nil value")); } }
static int get_events(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; System.Collections.Generic.List <UnityEngine.Events.UnityEvent> ret = obj.events; ToLua.PushSealed(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index events on a nil value")); } }
static int get_local(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; bool ret = obj.local; LuaDLL.lua_pushboolean(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index local on a nil value")); } }
static int get_timeValue(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; SWS.splineMove.TimeValue ret = obj.timeValue; ToLua.Push(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index timeValue on a nil value")); } }
static int set_speed(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; float arg0 = (float)LuaDLL.luaL_checknumber(L, 2); obj.speed = arg0; return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index speed on a nil value")); } }
static int get_speed(IntPtr L) { object o = null; try { o = ToLua.ToObject(L, 1); SWS.splineMove obj = (SWS.splineMove)o; float ret = obj.speed; LuaDLL.lua_pushnumber(L, ret); return(1); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e, o, "attempt to index speed on a nil value")); } }
//get references void Start() { move = GetComponent<splineMove>(); if (!move) { Debug.LogWarning(gameObject.name + " missing movement script!"); return; } //set speed to an arbitrary small value //otherwise the tween can't be initialized move.speed = 0.01f; //initialize movement but don't start it yet move.StartMove(); move.Pause(); move.speed = 0f; }
//getting component references void Start() { animator = GetComponentInChildren<Animator>(); switch (mType) { case MovementType.splineMove: hMove = GetComponent<splineMove>(); break; case MovementType.bezierMove: bMove = GetComponent<bezierMove>(); break; case MovementType.navMove: nAgent = GetComponent<NavMeshAgent>(); break; } }
//get references at start //initialize movement but don't start it yet void Start() { myMove = gameObject.GetComponent<splineMove>(); myMove.StartMove(); myMove.Pause(); }