Play() 개인적인 메소드

private Play ( ) : void
리턴 void
예제 #1
0
        static int _m_Play(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            UnityEngine.ParticleSystem __cl_gen_to_be_invoked = (UnityEngine.ParticleSystem)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 1)
                {
                    __cl_gen_to_be_invoked.Play(  );



                    return(0);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
                {
                    bool withChildren = LuaAPI.lua_toboolean(L, 2);

                    __cl_gen_to_be_invoked.Play(withChildren);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to UnityEngine.ParticleSystem.Play!"));
        }
예제 #2
0
 static public int Play(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l);
             self.Play();
             pushValue(l, true);
             return(1);
         }
         else if (argc == 2)
         {
             UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l);
             System.Boolean             a1;
             checkType(l, 2, out a1);
             self.Play(a1);
             pushValue(l, true);
             return(1);
         }
         pushValue(l, false);
         LuaDLL.lua_pushstring(l, "No matched override function to call");
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    static int Play(IntPtr L)
    {
#if UNITY_EDITOR
        ToluaProfiler.AddCallRecord("UnityEngine.ParticleSystem.Register");
#endif
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem));
                obj.Play();
                return(0);
            }
            else if (count == 2)
            {
                UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem));
                bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ParticleSystem.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
    static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem));
                obj.Play();
                return(0);
            }
            else if (count == 2)
            {
                UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.CheckObject(L, 1, typeof(UnityEngine.ParticleSystem));
                bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ParticleSystem.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
예제 #5
0
    static int Play(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1 && TypeChecker.CheckTypes <UnityEngine.ParticleSystem>(L, 1))
            {
                UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1);
                obj.Play();
                return(0);
            }
            else if (count == 2 && TypeChecker.CheckTypes <UnityEngine.ParticleSystem, bool>(L, 1))
            {
                UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1);
                bool arg0 = LuaDLL.lua_toboolean(L, 2);
                obj.Play(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: UnityEngine.ParticleSystem.Play"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
예제 #6
0
    // fonction appelée lorsqu'un boulet de canon explose
    public void Explode(Vector3 position)
    {
        Vector3 dist;

        for(int i = 0; i < projectilePoolActive.Count; i++)
        {
            go = (GameObject) projectilePoolActive[i];

            dist = go.transform.position - position;

            if(dist.magnitude < 999){/*...*/}
        }

        if(fxPoolReady.Count > 0)
        {
            go = (GameObject) fxPoolReady[0];
            go.transform.position = position;
            go.SetActive(true);

            fx = go.GetComponent(typeof(FX)) as FX;
            fx.Trigger();

            ps = go.GetComponent(typeof(ParticleSystem)) as ParticleSystem;
            ps.Play();

            fxPoolReady.RemoveAt(0);
            fxPoolActive.Add(go);
        }
        print("<explode>");
    }
예제 #7
0
 void Start()
 {
     transform.Rotate(new Vector3(285f,350f,355f));
     particle = GetComponent<ParticleSystem>();
     particle.Play();
     Invoke ("Delete",particle.startLifetime);
 }
 static public int Play(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         if (argc == 1)
         {
             UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l);
             self.Play();
             return(0);
         }
         else if (argc == 2)
         {
             UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l);
             System.Boolean             a1;
             checkType(l, 2, out a1);
             self.Play(a1);
             return(0);
         }
         LuaDLL.luaL_error(l, "No matched override function to call");
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
예제 #9
0
 public void setShield(bool hasShield)
 {
     this.hasShield = true;
     shield = GetComponent<ParticleSystem>();
     shield.Play();
     StartCoroutine (KeepShield());
 }
 void Start()
 {
     stateController = GameObject.FindWithTag("Player").GetComponent<TurtleStateController>();
     forceVector = transform.forward * magnitude;
     particleSystem = GetComponent<ParticleSystem>();
     particleSystem.Play();
 }
예제 #11
0
	// Update is called once per frame
	void Update () {
		if (Input.GetMouseButtonDown (0)) {
			clone = Instantiate (shotEffectPrefab, transform.position, transform.rotation) as ParticleSystem;
			clone.Play ();

		}
	}
		public ParticleEffectInstanceManager(EffectManager effect_manager, Mesh character_mesh, bool letter_flipped, ParticleEffectSetup effect_setup, AnimationProgressionVariables progression_vars, AnimatePerOptions animate_per, ParticleEmitter particle_emitter = null, ParticleSystem particle_system = null)
		{
			m_particle_emitter = particle_emitter;
			m_particle_system = particle_system;
			m_letter_mesh = character_mesh;
			m_letter_flipped = letter_flipped;
			m_follow_mesh = effect_setup.m_follow_mesh;
			m_duration = effect_setup.m_duration.GetValue(progression_vars, animate_per);
			m_delay = effect_setup.m_delay.GetValue(progression_vars, animate_per);
			m_position_offset = effect_setup.m_position_offset.GetValue(progression_vars, animate_per);
			m_rotation_offset = Quaternion.Euler(effect_setup.m_rotation_offset.GetValue(progression_vars, animate_per));
			m_rotate_with_letter = effect_setup.m_rotate_relative_to_letter;
			m_effect_manager_handle = effect_manager;
			m_active = false;

			if(m_particle_emitter != null)
			{
				m_transform = m_particle_emitter.transform;

				m_particle_emitter.emit = true;
				m_particle_emitter.enabled = false;
			}
			else if(m_particle_system != null)
			{
				m_transform = m_particle_system.transform;

				m_particle_system.playOnAwake = false;
				m_particle_system.Play();
	#if !UNITY_3_5 && UNITY_EDITOR
				p_system_timer = 0;
	#endif
			}
		}
예제 #13
0
    void Awake()
    {
        //lane = 1;
        particles = transform.GetChild (0).gameObject.GetComponent<ParticleSystem> ();
        beam = transform.GetChild (1).gameObject.GetComponent<ParticleSystem> ();
        line = transform.GetChild (2).gameObject.GetComponent<LineRenderer> ();
        inLaserSequence = false;
        inSplitSequence = false;
        isActive = true;
        startFadeOut = false;
        startFadeIn = false;

        line.sortingLayerName = "Explosion/Fizz";
        transform.position += Vector3.up * -(lane - 2);
        if (Team == "Blue") {
            particles.transform.position = GameObject.FindGameObjectWithTag ("BlueBase").transform.position + Vector3.up * -(lane - 2);
        } else if (Team == "Red") {
            particles.transform.position = GameObject.FindGameObjectWithTag ("RedBase").transform.position + Vector3.up * -(lane - 2);
        }

        particles.Play ();
        Invoke ("beginBeam", 0.5f);
        Invoke ("drawLine", 1);
        Invoke ("setLooping", 2);
        Invoke ("setInactive", 1.5f);
        Invoke ("destroy", 3);
        Debug.Log (particles.gameObject.transform.position);
    }
 static int QPYX_Play_YXQP(IntPtr L_YXQP)
 {
     try
     {
         int QPYX_count_YXQP = LuaDLL.lua_gettop(L_YXQP);
         if (QPYX_count_YXQP == 1)
         {
             UnityEngine.ParticleSystem QPYX_obj_YXQP = (UnityEngine.ParticleSystem)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.ParticleSystem));
             QPYX_obj_YXQP.Play();
             return(0);
         }
         else if (QPYX_count_YXQP == 2)
         {
             UnityEngine.ParticleSystem QPYX_obj_YXQP = (UnityEngine.ParticleSystem)ToLua.CheckObject(L_YXQP, 1, typeof(UnityEngine.ParticleSystem));
             bool QPYX_arg0_YXQP = LuaDLL.luaL_checkboolean(L_YXQP, 2);
             QPYX_obj_YXQP.Play(QPYX_arg0_YXQP);
             return(0);
         }
         else
         {
             return(LuaDLL.luaL_throw(L_YXQP, "invalid arguments to method: UnityEngine.ParticleSystem.Play"));
         }
     }
     catch (Exception e_YXQP)                {
         return(LuaDLL.toluaL_exception(L_YXQP, e_YXQP));
     }
 }
예제 #15
0
 // Use this for initialization
 void Start()
 {
     psys = GetComponent<ParticleSystem>();
     psys.Play();
     if (!psys) Destroy(gameObject);
     Destroy(gameObject, psys.duration + psys.startLifetime);
 }
예제 #16
0
    public override void Play(GameObject target)
    {
        // Get particle system
        _particleSystem = target.GetComponent<ParticleSystem>();

        _particleSystem.time = 0;
        _particleSystem.Play();
    }
예제 #17
0
	// Use this for initialization
	void Start () {
		activeObjectList = new List<GameObject>();
		pushForce = new Vector2(0.0f, 0.0f);
		particles = gameObject.GetComponent<ParticleSystem>();
		emis = particles.emission;
		emis.enabled = false;
		particles.Play();
	}
예제 #18
0
 public void LevelIncrease()
 {
     levelUp = GameObject.Find ("Level_Up_Popup").GetComponent<ParticleSystem> ();
     levelUp.Stop();
     level++;
     levelUp.enableEmission = true;
     levelUp.Play();
 }
예제 #19
0
    void Start()
    {
        ps = GetComponent<ParticleSystem>();
        ps.Stop();

        RandSize();
        ps.Play();
        //StartCoroutine(SetTime());
    }
예제 #20
0
 void Start()
 {
     transform.LookAt(PlayerStats.Player.transform.position);
     PS = GetComponent<ParticleSystem>();
     AS = GetComponent<AudioSource>();
     Value = HitObject.GetComponent<SteamAmount>().Amount;
     PS.Play();
     StartCoroutine(CheckSteamAudio());
 }
예제 #21
0
파일: Furnace.cs 프로젝트: jiminl5/batilda
 // Use this for initialization
 void Start()
 {
     source = GetComponent<AudioSource>();
     _smoke = Instantiate(Resources.Load("Smoke") as GameObject);
     _smoke.transform.parent = transform;
     _smoke.transform.position = transform.position;
     smoke = _smoke.GetComponent<ParticleSystem>();
     smoke.Play();
 }
예제 #22
0
 void CheckCurrentSmoke(ref ParticleSystem compareWith)
 {
     if (currentSmoke.name != compareWith.name)              // if currentSmoke isn't the same that compareWith smoke
     {
         currentSmoke.Stop();                                // stop Playing current smoke
         currentSmoke = compareWith;                         // set currentSmoke to correct smoke that we compare with
         currentSmoke.Play();                                // Play smoke
     }
 }
 // Use this for initialization
 void Start()
 {
     audio = GetComponent<AudioSource>();
     particles = GetComponent<ParticleSystem>();
     //Start playing immediately
     if (audio)
         audio.Play();
     if (particles)
         particles.Play();
 }
예제 #24
0
	void play(ParticleSystem ps, ParticleInfos pi){
		//ps.duration = pi.duration / music.tempo * 60;
		ps.Stop ();
		ps.startSize = pi.size;
		ps.startSpeed = pi.speed;
		if(pi.quantity > 0)
			ps.Emit (pi.quantity);
		ps.emissionRate = pi.timeQuantity;
		ps.Play ();
	}
예제 #25
0
 void Start()
 {
     a = gameObject.GetComponent<Animation>();
     a.Play ();
     //Debug.Log (a.clip.name);
     b = gameObject.GetComponent<Animation>();
     c = gameObject.GetComponent<Animation>();
     partsys = phySystem.GetComponent<ParticleSystem> ();
     partsys.Play ();
 }
예제 #26
0
 public void Init(Main main)
 {
     currentValue = UnityEngine.Random.Range (minimum, maximum);
     transform.localScale = new Vector3 (main.LocationWidthInMeters / 2, 1, 1);
     transform.localPosition = new Vector3 (transform.localScale.x, main.LocationHeightInMeters + 1, 0);
     particles = GetComponent<ParticleSystem> ();
     particles.emissionRate = CalculateCurrentEmissionRate();
     particles.Simulate (1);
     particles.Play ();
 }
예제 #27
0
파일: Unit.cs 프로젝트: EunoiaGames/MTW
    public void DeploymentComplete()
    {
        _isActive = true;
        _spawningParticles.Stop();
        _spawningParticles.transform.SetParent(null);
        PoolMaster.Despawn(_spawningParticles.gameObject,5f);
        _landingParticles = PoolMaster.SpawnRandomReference("PS_Landed", this.transform.position).GetComponent<ParticleSystem>();

        _landingParticles.Play();
        PoolMaster.Despawn(_landingParticles.gameObject, 5f);
    }
예제 #28
0
	public void CrashAndBurn () {
		renderer.enabled = false;
		collider.enabled = false;

		explosion = Instantiate(explosionPrefab) as ParticleSystem;
		explosion.transform.position = transform.position;
		explosion.transform.parent = transform;

		explosion.Play();
		Destroy(explosion, explosion.duration);
	}
예제 #29
0
파일: Shot.cs 프로젝트: almudi/JorgAnd
	public void pistolShot()
	{
		if (fireRate<=0) {
			fireRate = 0.3f;
			faceForward ();
			particle = Instantiate (shotEffectPrefab, bulletSpawn.position, bulletSpawn.rotation) as ParticleSystem;
			particle.Play ();
			Instantiate (bullet, bulletSpawn.position, bulletSpawn.rotation);
		}
		fireRate -= Time.deltaTime;
	}
예제 #30
0
	void OnTriggerEnter(Collider c){
		if (c.gameObject.tag == "Unit"){
			if (c.gameObject.GetComponent<Unit> ().player1 != player1) {
				Debug.Log("EXPLODE!");
				mineExp = (ParticleSystem)Instantiate (mineExp);
				mineExp.transform.position = transform.position;
				mineExp.Play ();
				c.GetComponent<Unit>().health -= damage;
				Destroy(this.gameObject);
			}
		}
	}
예제 #31
0
    void Splash()
    {
        ps = GetComponent<ParticleSystem> ();
        ps.Simulate (0);
        ps.Play ();

        GetComponent<Renderer> ().enabled = false;

        foreach (Collider2D other in Physics2D.OverlapCircleAll (new Vector2 (rb.position.x, rb.position.y), splashRadius))
            if (other.tag == "Enemy")
                other.gameObject.AddComponent<DoT> ().Initialize (dps, duration);
    }
 static public int Play(IntPtr l)
 {
     try {
         UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l);
         self.Play();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #33
0
파일: Explosion.cs 프로젝트: GarethIW/LD33
    public void Init(float scale)
    {
        explodeSource.pitch = Random.Range(0.8f, 1.2f);

        transform.localScale = Vector3.one*scale;

        parts = GetComponent<ParticleSystem>();
        parts.Play();

        time = 8f;
        gameObject.SetActive(true);
    }
	protected override void ModifyEntity()
	{
		if (particleEmitterResourceName != null)
		{
			particleEmitterObject = GameObject.Instantiate(Resources.Load(particleEmitterResourceName)) as GameObject;		
			
			particleEmitter = particleEmitterObject.transform.particleSystem;		
			particleEmitter.Play();
		
			if (target != null)
				particleEmitterObject.transform.position = target.transform.position;
		}
	}
예제 #35
0
	public void Trigger(AnimateToPoint victimAnimator,
		ParticleSystem poofCloud,
		GameObject bigDemonRoot,
		Transform demonRoot,
		Transform sadRoot,
		Vector3 startPos,
		Vector3 podiumPos,
		Action onComplete) {

		demonRoot.gameObject.SetActive(false);
		victimAnimator.transform.position = startPos;
		poofCloud.Play();
		ScreenShaker.Instance.ApplyShake(ShakeForce);

		victimAnimator.Trigger(TweenToQueue, podiumPos, () => {
			poofCloud.Play();
			ScreenShaker.Instance.ApplyShake(ShakeForce);
			bigDemonRoot.SetActive(true);
			sadRoot.gameObject.SetActive(true);
			onComplete();
		});
	}
 static public int Play__Boolean(IntPtr l)
 {
     try {
         UnityEngine.ParticleSystem self = (UnityEngine.ParticleSystem)checkSelf(l);
         System.Boolean             a1;
         checkType(l, 2, out a1);
         self.Play(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
예제 #37
0
        public static void ClusterPlay(this UnityEngine.ParticleSystem ps)
        {
            var observer = validateCheck(ps);

            if (observer == null)
            {
                return;
            }
            ps.Play();
            FduParticleSystemOP op = new FduParticleSystemOP();

            op.operation = FduParticleSystemOP.Operation.play;
            observer.addOperation(op);
        }
예제 #38
0
 public Player(string n, int x, int z)
 {
     name = n;
     health = 100;
     mana = 100;
     maxMana = 100;
     GameObject playerPrefab = PrefabFactory.GetSuzePrefab();
     GameManager.InstantiateModel(playerPrefab, new Vector3(x,0,z));
     player = GameObject.Find("SusePrefab(Clone)");
     player.name = name;
     player.transform.Rotate(0,180,0);
     GameObject auraObj = player.transform.Find("Aura").gameObject;
     aura = auraObj.GetComponent<ParticleSystem>();
     aura.Play();
 }
예제 #39
0
        public override void OnEnter()
        {
            ps = Fsm.GetOwnerDefaultTarget(gameObject).GetComponent<ParticleSystem>();

            if (emitOnOff.Value) ps.Play(); else ps.Stop();

            if (delay.Value <= 0)
            {
                Finish();
                return;
            }

            startTime = Time.realtimeSinceStartup;
            timer = 0f;
        }
예제 #40
0
	void OnCollisionEnter2D(Collision2D coll) {
		if(coll.collider.name != "Ground") {
			GetComponent<Animator>().SetInteger ("HP", 0);

			blood = Instantiate(blood) as ParticleSystem;
			blood.transform.position = transform.position;
			blood.Play();

			collider2D.enabled = false;
			rigidbody2D.Sleep ();
			
			enabled = false;
		}

	}
예제 #41
0
        public static void ClusterPlay(this UnityEngine.ParticleSystem ps, bool withChildren)
        {
            var observer = validateCheck(ps);

            if (observer == null)
            {
                return;
            }
            ps.Play(withChildren);
            FduParticleSystemOP op = new FduParticleSystemOP();

            op.operation = FduParticleSystemOP.Operation.play;
            op.paras     = new object[1];
            op.paras[0]  = withChildren;
            observer.addOperation(op);
        }
	static public int Play(IntPtr l) {
		try {
			#if DEBUG
			var method = System.Reflection.MethodBase.GetCurrentMethod();
			string methodName = GetMethodName(method);
			#if UNITY_5_5_OR_NEWER
			UnityEngine.Profiling.Profiler.BeginSample(methodName);
			#else
			Profiler.BeginSample(methodName);
			#endif
			#endif
			int argc = LuaDLL.lua_gettop(l);
			if(argc==1){
				UnityEngine.ParticleSystem self=(UnityEngine.ParticleSystem)checkSelf(l);
				self.Play();
				pushValue(l,true);
				return 1;
			}
			else if(argc==2){
				UnityEngine.ParticleSystem self=(UnityEngine.ParticleSystem)checkSelf(l);
				System.Boolean a1;
				checkType(l,2,out a1);
				self.Play(a1);
				pushValue(l,true);
				return 1;
			}
			pushValue(l,false);
			LuaDLL.lua_pushstring(l,"No matched override function Play to call");
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
		#if DEBUG
		finally {
			#if UNITY_5_5_OR_NEWER
			UnityEngine.Profiling.Profiler.EndSample();
			#else
			Profiler.EndSample();
			#endif
		}
		#endif
	}
    static int Play(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.ParticleSystem)))
        {
            UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1);

            try
            {
                obj.Play();
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            return(0);
        }
        else if (count == 2 && ToLua.CheckTypes(L, 1, typeof(UnityEngine.ParticleSystem), typeof(bool)))
        {
            UnityEngine.ParticleSystem obj = (UnityEngine.ParticleSystem)ToLua.ToObject(L, 1);
            bool arg0 = LuaDLL.lua_toboolean(L, 2);

            try
            {
                obj.Play(arg0);
            }
            catch (Exception e)
            {
                return(LuaDLL.toluaL_exception(L, e));
            }

            return(0);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.ParticleSystem.Play");
        }

        return(0);
    }