PowerUp
PowerUp Overview
PROPERTIES
ADDING CUSTOM POWER UPS
using UnityEngine;
using cowsins2D;
public class MyCustomPowerUp : PowerUp
{
// this method gets called when the power up is triggered
// call anything you need in here.
// You have access to the player gameObject ( target ). You can access its components
// through GetComponent<ComponentName>()
public override void TriggerAction(GameObject target)
{
// Write your custom behaviour here
base.TriggerAction(target);
}
}Last updated