Exemple #1
0
    protected virtual void Reset()
    {
        ParticleSystem[] p = GetComponentsInChildren <ParticleSystem>(true);
        Particles = p;

        muzzle  = transform.Find("Muzzle").transform;
        turrets = transform.GetComponentInParent <TurretsContorl>();
    }
Exemple #2
0
    private void Reset()
    {
        model = transform.GetChild(0).transform;

        ParticleSystem[] p = GetComponentsInChildren <ParticleSystem>(true);
        Particles = p;

        muzzle  = transform.Find("Muzzle").transform;
        turrets = transform.GetComponentInParent <TurretsContorl>();
    }
Exemple #3
0
    protected virtual void Start()
    {
        Transform root = GetRoot(transform);

        if (root.tag == "Player")
        {
            controllerIsPlayer = true;
        }
        if (!turrets)
        {
            turrets = transform.GetComponentInParent <TurretsContorl>();
        }
        if (!muzzle)
        {
            muzzle = transform.Find("Muzzle").transform;
        }
    }
Exemple #4
0
 protected override void Start()
 {
     base.Start();
     t = GetComponentInParent <TurretsContorl>();
 }