public void OnSpawned(AlertAreaType _type, Color _color, float _rotY, float _wid, float _length, float _duration) { base.OnSpawned(); this.gameObject.transform.eulerAngles = new Vector3(90, _rotY, 0); Projector pro = this.gameObject.GetComponent <Projector>(); pro.aspectRatio = _wid / _length; pro.orthographicSize = Mathf.Max(_length, _wid); mat = pro.material; if (mat != null) { mat.mainTexture = GameStageUtility.GetTextureByType(_type); fromColor = new Color(_color.r, _color.g, _color.b, 0); mat.color = fromColor; aimColor = _color; startTime = Time.time; shakeScale = Mathf.Abs(startShake); } Invoke("StartReturn", _duration); }
static int _m_GetTextureByType_xlua_st_(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); try { { AlertAreaType _type; translator.Get(L, 1, out _type); UnityEngine.Texture __cl_gen_ret = GameStageUtility.GetTextureByType(_type); translator.Push(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } }