コード例 #1
0
    // 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>();
    }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     //initializing the characterController property
     characterController = GetComponent <CharacterController>();
     wobbleDirection     = transform.right;
     deathParticles      = gameObject.GetComponentInChildren <DeathParticles>();
 }
コード例 #3
0
    // 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>();
    }
コード例 #4
0
 public DeathParticles GetDeathParticles()
 {
     if (deathParticles == null)
     {
         deathParticles = GetComponentInChildren <DeathParticles>();
     }
     return(deathParticles);
 }
コード例 #5
0
    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);
    }
コード例 #6
0
    public static ParticleSystem MakeSystem(DeathParticles deathType)
    {
        ParticleSystem newSystem;

        //Debug.Log("Making a " + (int)projectileType);
        newSystem = Instantiate(deathFabs[(int)deathType]);
        return(newSystem);
    }
コード例 #7
0
ファイル: Rocket.cs プロジェクト: TaaasT/Project-Boost
 private void StartDeathSequence()
 {
     isTransitioning = true;
     audioSource.Stop();
     audioSource.PlayOneShot(death);
     DeathParticles.Play();
     Invoke("LoadFirstLevel", levelLoadDelay);
 }
コード例 #8
0
ファイル: Alien.cs プロジェクト: WLafleur07/BobbleheadWars
 public DeathParticles GetDeathParticles()
 {
     if (deathParticles == null)
     {
         // returns the first death particle script found.
         deathParticles = GetComponentInChildren <DeathParticles>();
     }
     return(deathParticles);
 }
コード例 #9
0
 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>();
 }
コード例 #10
0
ファイル: Enemy4Fly.cs プロジェクト: Jakkeli/Gonan2
 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;
 }
コード例 #11
0
 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;
 }
コード例 #12
0
    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);
        }
    }
コード例 #13
0
 // 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>();
 }
コード例 #14
0
 // Use this for initialization
 void Start()
 {
     characterController = GetComponent <CharacterController>();
     deathParticles      = gameObject.GetComponentInChildren <DeathParticles>();
 }
コード例 #15
0
 // 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>();
 }
コード例 #16
0
 // Use this for initialization
 void Start()
 {
     //get the character controller
     characterController = GetComponent <CharacterController>();
     marineParticles     = GetComponentInChildren <DeathParticles>();
 }
コード例 #17
0
 // Use this to ensure it is called when an object is reused
 private void OnEnable()
 {
     characterController = GetComponent <CharacterController>();
     deathParticles      = gameObject.GetComponentInChildren <DeathParticles>();
 }
コード例 #18
0
 public static void SetSystem(ParticleSystem particleSystem, DeathParticles deathType)
 {
 }
コード例 #19
0
 // Start is called before the first frame update
 void Start()
 {
     deathParticles = gameObject.GetComponent <DeathParticles>();
     //to refrence the character controller component
     characterController = GetComponent <CharacterController>();
 }