Beispiel #1
0
    void Start()
    {
        sendBack = false;

        player = this.gameObject;
        chaseTransScript = GameObject.Find ("BGM").GetComponent<chaseTransition>();	// get chase music transition script
        playerScript = player.GetComponent<TemporaryMovement>();

        checkpointNumber = 0;	// No checkpoint has pass through yet, therefore 0
    }
Beispiel #2
0
 void Start()
 {
     maxColor.a = colorAlpha;
     color.a = colorAlpha;
     minColor.a = colorAlpha;
     rend = GetComponent<Renderer>();
     radius = startRadius;
     sniff = GetComponent<AudioSource>();
     chaseTransScript = GameObject.Find ("BGM").GetComponent<chaseTransition>();
     detectionTimer = defaultDetectionRange;
     particle = GetComponent<ParticleSystem>();
 }
Beispiel #3
0
    void Start()
    {
        chaseTransScript = GameObject.Find("BGM").GetComponent<chaseTransition>();
        range = startRange;
        width = startWidth;
        height = startHeight;

        if (this.transform.parent.GetComponent<enemyPathfinding>() != null)
        {
            script = this.transform.parent.GetComponent<enemyPathfinding>();
        }

        if (this.transform.parent.GetComponent<fatDogAi>() != null)
        {
            scriptFatDog = this.transform.parent.GetComponent<fatDogAi>();
        }
        if (transform.parent.GetComponent<huntingDog>() != null)
        {
            scriptHuntingDog = transform.parent.GetComponent<huntingDog>();
        }
        parent = this.transform.parent;

        //if (transform.localScale.x < width || transform.localScale.x > width)
        //{
            transform.localScale = new Vector3(width, height, range);
        //}
    }