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