Exemple #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;
    }
Exemple #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>();
        }
    }
Exemple #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;
    }