Exemplo n.º 1
0
    void Start()
    {
        rb           = GetComponent <Rigidbody2D>();
        animate      = GetComponent <Animator>();
        ground_check = GetComponentInChildren <ground_checker>();

        Stringer_button = GameObject.Find("Stringer_cooldown");
        sound_manager   = GameObject.Find("Sound_and_button_manager").GetComponent <soundmanager>();


        cooldown_skill = GameObject.Find("Skill_cooldown_manager").GetComponent <Cooldown_and_Skill_Checker>();
    }
Exemplo n.º 2
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        if (instance != this)
        {
            Destroy(gameObject);
        }

        DontDestroyOnLoad(gameObject);
    }
Exemplo n.º 3
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }

        var obj = FindObjectsOfType <soundmanager>();

        if (obj.Length == 1)
        {
            DontDestroyOnLoad(transform.gameObject);
        }
        else
        {
            Destroy(gameObject);
        }
    }
    // Baslangic değerleri
    void Start()
    {
        anim       = GetComponent <Animator>();
        playerBody = GetComponent <Rigidbody2D>();
        sman       = FindObjectOfType <soundmanager>();



        /*if(!playerExists)
         * {
         *  playerExists = true;                 // oyuncunun geçişlerde kopyalanmasını engelliyoruz
         *  DontDestroyOnLoad(gameObject);
         *
         * }
         * else
         * {
         *  Destroy(gameObject);
         *
         * }*/

        lastMove = new Vector2(0f, -1f);
    }
Exemplo n.º 5
0
 // Use this for initialization
 void Awake()
 {
     sound_manager = this;
 }
Exemplo n.º 6
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     sman     = FindObjectOfType <soundmanager>();
 }