i have this code from a script I created for collision
function onTriggerEnter(col : Collision)
{
if(col.gameObject.name == "Current Power Up")
{
Destroy(col.gameObject);
powerUp.countDown = powerUp.powerUpTime;
}
}
and needs to access this variables and change the values
public var powerUpTime : float = 10.0;
public var powerUpEffectTime : float = 5.0;
I get this error…how can i solve it?
Assets/snakeCollision.js(16,17): BCE0020: An instance of type ‘powerUp’ is required to access non static member ‘countDown’.
Assets/snakeCollision.js(16,37): BCE0020: An instance of type ‘powerUp’ is required to access non static member ‘powerUpTime’.
this will also be helpfull in future when i get to make the power up effecting the character.
Thanks in advance
Joseph