Example #1
0
    private void Awake()
    {
        var nun = ObjectLocator.GetPlayer();

        playerMovement = nun.GetComponent <PlatformerMovement2D>();
        divideAnim     = Instantiate(Resources.Load <GameObject>(Visuals.CROSS_BREAK), Vector2.zero, Quaternion.identity);
        divideAnim.SetActive(false);
    }
    private void Start()
    {
        var player = ObjectLocator.GetPlayer();

        if (player != null)
        {
            playerMovement = player.GetComponent <PlatformerMovement2D>();
        }
    }
Example #3
0
 public void Start()
 {
     invuln   = GetComponent <Invulnerability>();
     movement = GetComponent <PlatformerMovement2D>();
 }
 // Use this for initialization
 void Start()
 {
     anim           = GetComponent <Animator>();
     playerMovement = GetComponent <PlatformerMovement2D>();
 }