public static new void CheckLoadPrefab() { if (PrefabMarker == null) { PrefabMarker = Resources.Load <ExtraDamageMarker>("ExtraDamageMarker"); } }
public static ExtraDamageMarker Spawn(Vector3 position, float angle, float speed, Disruptor owner) { CheckLoadPrefab(); ExtraDamageMarker output = Instantiate(PrefabMarker, position, Quaternion.Euler(0, 0, angle)) as ExtraDamageMarker; output.speed = speed; output.angle = angle; output.lifeTime = 3; output.owner = owner; return(output); }
protected override void ExecuteSpecialX() { AudioManager.PlayClipByName("Shot2"); ExtraDamageMarker.Spawn(transform.position + MathLib.FromPolar(Player.Radius + ExtraDamageMarker.Radius, Player.TurretAngle).ToVector3(), Player.TurretAngle, Player.shotSpeed, this); }