Exemplo n.º 1
1
 // Use this for initialization
 public void ManualStart()
 {
     _rigidbody = GetComponent<Rigidbody>();
     _trail = GetComponent<TrailRenderer>();
     _startTime = _trail.time;
     _gameObject = gameObject;
 }
Exemplo n.º 2
0
    void Start()
    {
        tr = GetComponent<TrailRenderer>();

        tr.sortingLayerName = "Default";
        tr.sortingOrder = 50;
    }
Exemplo n.º 3
0
 void Awake()
 {
     trigger = GetComponent<CircleCollider2D> ();
     body = GetComponent<Rigidbody2D> ();
     trail = GetComponent<TrailRenderer> ();
     aud = GetComponent<AudioSource> ();
 }
Exemplo n.º 4
0
 void Awake()
 {
     m_trailRenderer = GetComponent<TrailRenderer>();
     m_points = new List<Vector3>();
     m_camera = Camera.main;
     m_toCommence = true;
 }
Exemplo n.º 5
0
 static public int constructor(IntPtr l)
 {
     UnityEngine.TrailRenderer o;
     o = new UnityEngine.TrailRenderer();
     pushObject(l, o);
     return(1);
 }
Exemplo n.º 6
0
 void Start()
 {
     trail = GetComponent<TrailRenderer>();
     SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
     trail.sortingLayerID = spriteRenderer.sortingLayerID;
     trail.sortingOrder = spriteRenderer.sortingOrder;
 }
Exemplo n.º 7
0
 void Start()
 {
     trail = transform.GetChild(0).GetComponent<TrailRenderer>();
     myRigidbody = GetComponent<Rigidbody2D>();
     myRigidbody.isKinematic = true;
     oldTime = trail.time;
 }
    void Start()
    {
        Debug.Log("instantiating bullet");

        rigidBody = this.GetComponent<Rigidbody2D>();
        trail = this.gameObject.GetComponentInChildren<TrailRenderer>();
    }
Exemplo n.º 9
0
 void Start()
 {
     obj = (GameObject)GameObject.Instantiate(obj);
     //		trailSub = transform.GetChild (0).gameObject;
     trail = obj.GetComponent<TrailRenderer>();
     player = transform.parent.transform.parent.gameObject;
     pMov = player.GetComponent<Player_Movement>();
     obj.collider2D.enabled = false;
     obj.transform.parent = transform;
     obj.GetComponent<HingeJoint2D>().anchor = new Vector2(-0.5f, 0);
     obj.GetComponent<HingeJoint2D>().connectedBody = player.rigidbody2D;
     obj.collider2D.enabled = true;
     objMid = obj.GetComponentInChildren<GrapplingStalk>();
     obj.SetActive(false);
     end = (GameObject)GameObject.Instantiate(end);
     end.transform.parent = transform.parent;
     endScript = end.GetComponent<GrapplingEnd>();
     endScript.setLayersToGrapple(possibleLayers);
     endScript.Setup(obj);
     endJoint = obj.AddComponent<HingeJoint2D>();
     endJoint.anchor = new Vector2(0.5f, 0);
     endJoint.connectedBody = end.rigidbody2D;
     lasCon = obj.GetComponent<laserConnector>();
     lasCon.endPoint = end.transform;
     lasCon.startPoint = transform.parent;
     lasCon.player = player.transform;
 }
Exemplo n.º 10
0
 //Gets the balls rigid body
 void Awake()
 {
     audio = GetComponent<AudioSource>();
     rb = GetComponent < Rigidbody > ();
     trail = gameObject.GetComponent<TrailRenderer>();
     trail.material.color = Color.blue;
 }
Exemplo n.º 11
0
 void Awake()
 {
     defaultMat = GetComponent<Renderer>().material;
     trail = GetComponent<TrailRenderer>();
     trail.enabled = true;
     halo = (Behaviour)GetComponent("Halo");
 }
	void Awake()
	{
		base.Awake ();
		m_transform = transform;
		m_collider = GetComponent<Collider>();
		mytrail = GetComponent<TrailRenderer>();
	}
Exemplo n.º 13
0
 public void ManualStart()
 {
     transform.position = new Vector3(-1000, -1000, -1000);
     spitRigidbody = GetComponent<Rigidbody>();
     _trail = GetComponent<TrailRenderer>();
     Disable();
 }
Exemplo n.º 14
0
 void Start()
 {
     m = (transform.position - target.transform.position).magnitude;
     _TR = GetComponent<TrailRenderer>();
     t = 0;
     apply = false;
 }
Exemplo n.º 15
0
 static IEnumerator ResetTrail(TrailRenderer trail)
 {
     var trailTime = trail.time;
     trail.time = -1;
     yield return new WaitForEndOfFrame();
     trail.time = trailTime;
 }
Exemplo n.º 16
0
 void Awake()
 {
     owner = GetComponentInParent<AliveEntity>();
     _collider = GetComponent<Collider>();
     _sound = GetComponent<AudioSource>();
     _trail = GetComponentInChildren<TrailRenderer>();
 }
Exemplo n.º 17
0
	public void Reset()
	{
		m_equipedRangeWeapon = PlayerStash.Instance.PurchasedCrossbow > 0 ? WEAPON_CROSSBOW : WEAPON_BOW;
		m_equipedMeleeWeapon = PlayerStash.Instance.PurchasedAxe > 0 ? WEAPON_AXE : WEAPON_SWORD;
	
		UseWeapon(m_equipedRangeWeapon);
		m_walkAccelerate = 0.0f;
		m_attackDirection = 0.0f;
		m_isAttacking = false;
		m_willAttack = false;
		m_hasAttackDoneDamage = 0;
		m_hasAttackPlaySound = 0;
		m_keyDelta = 0.0f;

		m_bendSpineTarget = 0.0f;
		m_currentWeaponTrail = null;
		if (m_holdingArrow != null) {
			GameObject.Destroy(m_holdingArrow.gameObject);
		}
		m_holdingArrow = null;

		m_hasTouchBegan = false;

		m_animator.CrossFade (ANIM_IDLE, 0.1f, 0, 0.0f);
		m_animator.SetBool(VAR_ATTACK, false);
		m_animator.SetFloat(VAR_WALK, 0.0f);
		m_isDying = false;

		m_HP = MaxHP;
	}
Exemplo n.º 18
0
 void Awake()
 {
     tr = this.GetComponent<TrailRenderer>();
     rb = root.GetComponent<Rigidbody>();
     animator = root.GetComponent<Animator>();
     //ps = root.GetComponent<PlayerState>();
 }
Exemplo n.º 19
0
 void Start()
 {
     myRigidbody = GetComponent<Rigidbody>();
     trail = GetComponent<TrailRenderer> ();
     cameraObject = GameObject.Find ("Main Camera");
     score = cameraObject.GetComponent<Score>();
     initialPosition = transform.position;
 }
Exemplo n.º 20
0
 // Use this for initialization
 void Start()
 {
     trail = GetComponent<TrailRenderer>();
     trail.sortingLayerName = "Player";
     trail.sortingOrder = -1;
     trail.time = 9999;
     stopTrail();
 }
Exemplo n.º 21
0
 void Start()
 {
     //Grab the linerenderer from the object and default it to disabled
     trail = gameObject.GetComponent<TrailRenderer>();
     trail.enabled = false;
     trail.sortingLayerName = "Player";
     trail.sortingOrder = 1;
 }
Exemplo n.º 22
0
    void Start()
    {
        spriteRenderer = GetComponent<SpriteRenderer>();
        trail = GetComponent<TrailRenderer>();
        renderer = GetComponent<Renderer>();

        SetSortOrder();
    }
        void Awake()
        {
            m_trans = transform;
            m_trail = GetComponent<TrailRenderer>();

            m_startScale = m_trans.localScale;
            m_startTrailTime = m_trail.time;
        }
Exemplo n.º 24
0
    // Use this for initialization
    void Awake()
    {
        Init();
        energyCost = 60f;
        trailRenderer = abilityOwner.GetComponent<TrailRenderer> ();

        range = 12f;
    }
Exemplo n.º 25
0
 void Start()
 {
     m_RenderReference = GetComponent<TrailRenderer> ();
     m_RenderReference.enabled = true;
     m_RenderReference.time = 0;
     m_RenderReference.startWidth = normalSize.x;
     m_RenderReference.endWidth = normalSize.y;
 }
Exemplo n.º 26
0
 // ReSharper restore UnusedMember.Local
 // ReSharper disable UnusedMember.Local
 private void Start()
 {
     _trailRenderer = GetComponent<TrailRenderer>();
     _particles = transform.FindChild("Particles").gameObject;
     _target = transform.FindChild("Target").gameObject;
     _player = Player.Instance;
     PlaceTarget();
 }
Exemplo n.º 27
0
	// Use this for initialization
	void Start () 
    {
	    if (trail == null)
        {
            trail = GetComponent<TrailRenderer>();
        }
        trail.enabled = false;
	}
Exemplo n.º 28
0
    void Start()
    {
        _trail = Component<TrailRenderer>();
        _pool = Scene.Object<TrailDetectorPool>().Pool;

        _lastDetector = _pool.RequestObject<TrailDetector>();
        _lastDetector.gameObject.layer = _layer;
    }
Exemplo n.º 29
0
    static public int set_endWidth(IntPtr l)
    {
        UnityEngine.TrailRenderer o = (UnityEngine.TrailRenderer)checkSelf(l);
        float v;

        checkType(l, 2, out v);
        o.endWidth = v;
        return(0);
    }
Exemplo n.º 30
0
    // Use this for initialization
    void Start()
    {
        myColour = renderer.material.color;
        sheild.renderer.material = this.gameObject.renderer.material;
        myTrail = GetComponent<TrailRenderer>();
        myTrail.sharedMaterial = renderer.material;

        particleSystem.startColor = myColour;
    }
 /// <summary>
 /// Coroutine to reset a trail renderer trail
 /// </summary>
 /// <param name="trail"></param>
 /// <returns></returns>
 static IEnumerator ResetTrail(TrailRenderer trail)
 {
     if (trail.time > 0) {
         var trailTime = trail.time;
         trail.time = 0;
         yield return 0;
         trail.time = trailTime;
     }
 }
Exemplo n.º 32
0
    static public int set_autodestruct(IntPtr l)
    {
        UnityEngine.TrailRenderer o = (UnityEngine.TrailRenderer)checkSelf(l);
        bool v;

        checkType(l, 2, out v);
        o.autodestruct = v;
        return(0);
    }
Exemplo n.º 33
0
 // Use this for initialization
 void Start()
 {
     trailRend = gameObject.GetComponent<TrailRenderer>();
     trailRend.material.color = GetComponent<Renderer>().material.color;
     glow = GetComponent<Light>();
     currentColor = GetComponent<Renderer>().material.color;
     trailRend.material.color = GetComponent<Renderer>().material.color;
     glow.color = GetComponent<Renderer>().material.color;
 }
Exemplo n.º 34
0
 void Awake()
 {
     mTrail = gameObject.GetComponent <UnityEngine.TrailRenderer>();
     if (null == mTrail)
     {
         EB.Debug.LogError("[TrailRendererHelper.Awake] invalid TrailRenderer.");
         return;
     }
 }
Exemplo n.º 35
0
 static public int get_colorGradient(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, self.colorGradient);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 36
0
 static public int get_alignment(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushEnum(l, (int)self.alignment);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 37
0
 static public int get_generateLightingData(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, self.generateLightingData);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 38
0
 static public int Clear(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         self.Clear();
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 39
0
 static public int get_numCapVertices(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, self.numCapVertices);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 40
0
 static public int get_minVertexDistance(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, self.minVertexDistance);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 41
0
 static public int get_widthCurve(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, self.widthCurve);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 42
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer o;
         o = new UnityEngine.TrailRenderer();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int get_endWidth(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.endWidth);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 44
0
 static public int get_endWidth(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, self.endWidth);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int get_textureMode(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.textureMode);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 46
0
 static public int set_autodestruct(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.autodestruct = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 47
0
 static public int set_numCapVertices(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         int v;
         checkType(l, 2, out v);
         self.numCapVertices = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 48
0
 static public int set_minVertexDistance(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.minVertexDistance = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 49
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer o;
         o = new UnityEngine.TrailRenderer();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
Exemplo n.º 50
0
 static public int set_endColor(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         UnityEngine.Color         v;
         checkType(l, 2, out v);
         self.endColor = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 51
0
 static public int set_generateLightingData(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.generateLightingData = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 52
0
 static public int set_textureMode(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer   self = (UnityEngine.TrailRenderer)checkSelf(l);
         UnityEngine.LineTextureMode v;
         checkEnum(l, 2, out v);
         self.textureMode = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 53
0
 static public int set_widthMultiplier(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.widthMultiplier = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 54
0
 static public int set_alignment(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         UnityEngine.LineAlignment v;
         checkEnum(l, 2, out v);
         self.alignment = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 55
0
 static public int set_widthCurve(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer  self = (UnityEngine.TrailRenderer)checkSelf(l);
         UnityEngine.AnimationCurve v;
         checkType(l, 2, out v);
         self.widthCurve = v;
         return(0);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 56
0
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.TrailRenderer o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.TrailRenderer();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
Exemplo n.º 57
0
 static public int set_endWidth(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.endWidth = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
 static public int set_endWidth(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.endWidth = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemplo n.º 59
0
 static public int set_colorGradient(IntPtr l)
 {
     try {
         UnityEngine.TrailRenderer self = (UnityEngine.TrailRenderer)checkSelf(l);
         UnityEngine.Gradient      v;
         checkType(l, 2, out v);
         self.colorGradient = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UnityEngine.TrailRenderer obj = (UnityEngine.TrailRenderer)ToLua.CheckObject(L, 1, typeof(UnityEngine.TrailRenderer));
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }