Пример #1
0
    void Start()
    {
        player = (GameObject) GameObject.FindWithTag ("Player");
        playerHealth = (HealthScript) player.GetComponent(typeof(HealthScript));
        router = (GameObject) GameObject.FindWithTag("Router");
        variableScript = (VariableScript) router.GetComponent( typeof(VariableScript) );

        tgtm = (ThinkGearTestManager) router.GetComponent( typeof(ThinkGearTestManager) );
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        health = maxHealth;
        GameObject camera = GameObject.Find("Main Camera");
        lighter = (MainLightScript) camera.GetComponentInChildren(typeof(MainLightScript));

        //playerScript = (PlayerScript) GameObject.Find("Player").GetComponent(typeof(PlayerScript));
        //if (type.Equals("enemy"))
        //	enemyScript = (EnemyScript) GetComponent(typeof(EnemyScript));
        GameObject router = GameObject.Find("Router");
        variableScript = (VariableScript) router.GetComponent(typeof(VariableScript));
        tgtm = (ThinkGearTestManager) router.GetComponent(typeof(ThinkGearTestManager));
    }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        player = (GameObject) GameObject.FindGameObjectWithTag("Player");
        playerHealth = (HealthScript) player.GetComponent(typeof(HealthScript));
        router = (GameObject) GameObject.FindWithTag("Router");
        variableScript = (VariableScript) router.GetComponent( typeof(VariableScript) );
        healthScript = (HealthScript) GetComponent(typeof(HealthScript));
        switch(type){
            case "follower":
                    //health = DifficultyScaler.followerHealth;
                    //healthScript.maxHealth = 70;
                    onDestroySFX = (GameObject)Instantiate(variableScript.EnemyNormalDestroySFX );
                break;
            case "shooter":
                    //health = DifficultyScaler.shooterHealth;
                    //healthScript.maxHealth = 40;
                    fireSFX	 = (GameObject)Instantiate(variableScript.EnemyShooterFireSFX );
                    onDestroySFX = (GameObject)Instantiate(variableScript.EnemyShooterDestroySFX );
                break;

        }
        variableScript.Enemies.Add(gameObject);

        tgtm = (ThinkGearTestManager) router.GetComponent(typeof(ThinkGearTestManager));
    }
Пример #4
0
 // Use this for initialization
 void Start()
 {
     tgtm = (ThinkGearTestManager) GameObject.Find("Router").GetComponent(typeof(ThinkGearTestManager));
 }