Пример #1
0
 private void Start()
 {
     spriteRenderer = GetComponent <SpriteRenderer>();
     anim           = GetComponent <Animator>();
     if (!isAbSnowman)
     {
         snowmanMelt = GetComponent <SnowmanMelt>();
     }
     rb          = GetComponent <Rigidbody2D>();
     audioSource = GetComponent <AudioSource>();
 }
Пример #2
0
 // Start is called before the first frame update
 void Start()
 {
     Debug.Assert(ammo != null);
     player         = GetComponent <Player>();
     rb             = GetComponent <Rigidbody2D>();
     anim           = GetComponent <Animator>();
     playerMovement = GetComponent <PlayerMovement>();
     if (!player.isAbSnowman)
     {
         snowmanMelt = GetComponent <SnowmanMelt>();
     }
     audioSource = GetComponent <AudioSource>();
 }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        rb = GetComponent <Rigidbody2D>();
        rb.freezeRotation = true;
        //set at start because cant initalize the value beforehand
        speedOnIce     = speedOnSnow * 2;
        spriteRenderer = GetComponent <SpriteRenderer>();
        player         = GetComponentInParent <Player>();
        anim           = GetComponent <Animator>();
        //Debug.Assert(anim != null, "Must have an animator component for movement");
        if (!player.isAbSnowman)
        {
            snowmanMelt = GetComponent <SnowmanMelt>();
        }

        audioSource = GetComponent <AudioSource>();
    }