public override BLRunStatus Run(BulletMLBullet bullet) { bullet.Speed = node.GetValue(this); //if(bullet.index == DISP_BULLET_INDEX) Debug.WriteLine("SetSpeed:" + bullet.Speed); end = true; return(BLRunStatus.End); }
public override BLRunStatus Run(BulletMLBullet bullet) { BLType blType = node.Type; float value = (float)(node.GetValue(this) * Math.PI / 180); if (blType == BLType.Sequence) { bullet.Direction = bullet.GetFireData().SourceDirection + value; } else if (blType == BLType.Absolute) { bullet.Direction = value; } else if (blType == BLType.Relative) { bullet.Direction = bullet.Direction + value; } else //if (blType == BLType.Aim || blType == BLType.None) { bullet.Direction = bullet.GetAimDir() + value; } //Debug.WriteLine(String.Format("SetDirecton:{0}, (type:{1} val:{2})", bullet.Direction / Math.PI * 180, node.type, value / Math.PI * 180)); End = true; return(BLRunStatus.End); }
public override void Init() { base.Init(); term = (int)node.GetValue(this) + 1; //初回実行時に一回処理されるため、そのぶん加算しておく }