// Start is called before the first frame update void Start() { // gets a reference to current component passed into the script characterController = GetComponent <CharacterController>(); deathParticles = gameObject.GetComponentInChildren <DeathParticles>(); }
// Start is called before the first frame update void Start() { //initializing the characterController property characterController = GetComponent <CharacterController>(); wobbleDirection = transform.right; deathParticles = gameObject.GetComponentInChildren <DeathParticles>(); }
// Start is called before the first frame update void Start() { //get the players character controller characterController = GetComponent <CharacterController>(); //find death particles deathParticles = gameObject.GetComponentInChildren <DeathParticles>(); }
public DeathParticles GetDeathParticles() { if (deathParticles == null) { deathParticles = GetComponentInChildren <DeathParticles>(); } return(deathParticles); }
private float navigationTime = 0; // keeps track of the time that had past since the last update public DeathParticles GetDeathParticles() { if (deathParticles == null) { deathParticles = GetComponentInChildren <DeathParticles>();// returns the first deathparticles script that it finds } return(deathParticles); }
public static ParticleSystem MakeSystem(DeathParticles deathType) { ParticleSystem newSystem; //Debug.Log("Making a " + (int)projectileType); newSystem = Instantiate(deathFabs[(int)deathType]); return(newSystem); }
private void StartDeathSequence() { isTransitioning = true; audioSource.Stop(); audioSource.PlayOneShot(death); DeathParticles.Play(); Invoke("LoadFirstLevel", levelLoadDelay); }
public DeathParticles GetDeathParticles() { if (deathParticles == null) { // returns the first death particle script found. deathParticles = GetComponentInChildren <DeathParticles>(); } return(deathParticles); }
void Start() { uac = GetComponentInChildren <UnityArmatureComponent>(); gm = GameObject.Find("GameManager").GetComponent <GameManager>(); player = GameObject.Find("player"); ps = player.GetComponent <Player>(); fabCtrl = GameObject.Find("FabricCtrl").GetComponent <FabricCtrl>(); if (activateOnStart) { Activate(); } dp = GetComponentInChildren <DeathParticles>(); mr = GetComponentsInChildren <MeshRenderer>(); }
void Start() { spriteRenderer = GetComponent <SpriteRenderer>(); dp = GetComponentInChildren <DeathParticles>(); player = GameObject.Find("player"); gm = GameObject.Find("GameManager").GetComponent <GameManager>(); ps = player.GetComponent <Player>(); fabCtrl = GameObject.Find("FabricCtrl").GetComponent <FabricCtrl>(); if (activateOnStart) { Activate(); } hDir = goRight ? 1 : -1; //prevHDir = hDir; }
void Start() { player = GameObject.Find("player"); dp = GetComponentInChildren <DeathParticles>(); gm = GameObject.Find("GameManager").GetComponent <GameManager>(); ps = player.GetComponent <Player>(); fabCtrl = GameObject.Find("FabricCtrl").GetComponent <FabricCtrl>(); if (activateOnStart) { Activate(); } originalPos = transform.position; hDir = goRight? 1:-1; svdir = startVDirDown ? 1 : 3; }
public void Explode() { Collider[] cols = Physics.OverlapSphere(transform.position, explosionRadius); foreach (Collider c in cols) { if (c.TryGetComponent <Ship>(out Ship s)) { s.TakeHit(damage); } } if (explosionParticles) { DeathParticles p = Instantiate(explosionParticles, transform.position, Quaternion.identity); p.SetStartSize(explosionRadius); } }
// Start is called before the first frame update void Start() { characterController = GetComponent <CharacterController>(); //Gets a reference to the Character Controller component deathParticles = gameObject.GetComponentInChildren <DeathParticles>(); }
// Use this for initialization void Start() { characterController = GetComponent <CharacterController>(); deathParticles = gameObject.GetComponentInChildren <DeathParticles>(); }
// Use this for initialization void Start() { characterController = GetComponent <CharacterController>(); //init and get a refereence to current component CharacterController attached to the GameObject deathParticles = GetComponentInChildren <DeathParticles>(); }
// Use this for initialization void Start() { //get the character controller characterController = GetComponent <CharacterController>(); marineParticles = GetComponentInChildren <DeathParticles>(); }
// Use this to ensure it is called when an object is reused private void OnEnable() { characterController = GetComponent <CharacterController>(); deathParticles = gameObject.GetComponentInChildren <DeathParticles>(); }
public static void SetSystem(ParticleSystem particleSystem, DeathParticles deathType) { }
// Start is called before the first frame update void Start() { deathParticles = gameObject.GetComponent <DeathParticles>(); //to refrence the character controller component characterController = GetComponent <CharacterController>(); }