Ejemplo n.º 1
0
    public override void ExitAbility(GameObject player)
    {
        base.ExitAbility(player);

        abilityInput.AxisOptions = AxisOptions.Both;
        cam.orthographicSize     = defaultZoom;

        player.GetComponent <PlayerMovement>().enabled = true;
        player.transform.SetParent(null);

        collidedPlatform = null;
    }
Ejemplo n.º 2
0
    private void SetPlatform(GameObject platform, COLORS platformColor)
    {
        if (platformColor != mainColor)
        {
            return;
        }

        if (platform == null)
        {
            collidedPlatform = null;
            return;
        }

        if (platform.GetComponent <ControllablePlatform>() != null)
        {
            collidedPlatform = platform.GetComponent <ControllablePlatform>();
        }
    }
Ejemplo n.º 3
0
    public override void InitAbility(GameObject player)
    {
        base.InitAbility(player);

        abilityInput.AxisOptions = AxisOptions.Vertical;

        playerColor   = player.GetComponent <PlayerColor>();
        movement      = player.GetComponent <PlayerMovement>();
        movementInput = ObjectReferences.instance.movementInput;

        cam         = Camera.main;
        zoom        = cam.orthographicSize;
        defaultZoom = zoom;

        collidedPlatform = null;

        EventManager.instance.setPlatformEvent -= SetPlatform;
        EventManager.instance.setPlatformEvent += SetPlatform;
    }