void Start()
 {
     //Rigidbody2D rigidbody = gameObject.AddComponent<Rigidbody2D>();
     wandering        = this.GetComponent <WanderingBehaviour>();
     player           = GameObject.Find("Scout");
     player_script    = player.GetComponent <Scout_Move>();
     player_transform = player.GetComponent <Transform>();
     rand_speed       = Random.Range(4, 7);
     ref_             = GameObject.Find("game_manager").GetComponent <GameManager>();
 }
示例#2
0
    // Start is called before the first frame update
    void Start()
    {
        music_source.clip = theme_music;


        score = 0;

        score_txt.GetComponent <Text>().text = "";

        player = player_ref.GetComponent <Scout_Move>();

        image_bomb.SetActive(false);
        image_flee.SetActive(false);

        frenzy_sky = frenzy_sky_obj.GetComponent <FrenzyScript>();
        frenzy_sun = frenzy_sun_obj.GetComponent <FrenzyScript>();

        frenzy_sun.enabled = false;
        frenzy_sky.enabled = false;

        original_color_sky = frenzy_sky_obj.GetComponent <Light>().color;
        original_color_sun = frenzy_sun_obj.GetComponent <Light>().color;
    }