Hey gang.
I have 3 .as files at the moment as follows:
Launchers.as
package
{
public class Launchers
{
public static var maxAngle:uint = 45;
}
}
RocketGrenade.as
package
{
public class RocketGrenade extends Launchers
{
static var radius:Number = 6;
static var velocity:Number = 8;
static var damage:Number = 15;
static var bounce:Boolean = false;
}
}
BounceGrenade.as
package
{
public class BounceGrenade extends Launchers
{
static var radius:Number = 6;
static var velocity:Number = 8;
static var damage:Number = 15;
static var bounce:Boolean = true;
}
}
Now what I’m trying to achieve is BounceGrenade and RocketGrenade classes to inherit the “maxAngle” property from their superclass “Launchers” so I could use code like:
trace(BounceGrenade.maxAngle)
for example.
Probably something simple I’m overlooking, could someone help explain why this wont work?