示例#1
0
文件: Enemy.cs 项目: scythae/Shmup
 protected override void Start()
 {
     base.Start();
     Speed     = 5;
     hitPoints = 1;
     unitSide  = UnitSide.usEnemy;
     DamageSource.AddToGameObject <DS_Ship> (this.gameObject, this.hitPoints, UnitSide.usPlayer);
     this.gameObject.AddComponent <TrajectoryLinear> ().Initialize(new Vector2(0.05f, 0), 0.05f);
     this.gameObject.AddComponent <TrajectoryCircle> ().Initialize(new Vector2(1, 1), 2);
 }
示例#2
0
文件: Player.cs 项目: scythae/Shmup
    protected override void Start()
    {
        base.Start();
        this.gameObject.AddComponent <BuffWielder> ();
        DamageSource.AddToGameObject <DS_Ship> (this.gameObject, this.hitPoints, UnitSide.usEnemy);

        Speed     = 5;
        hitPoints = 5;
        unitSide  = UnitSide.usPlayer;

        buttonActions = new Dictionary <string, SwitchAction> ();
        buttonActions.Add("Fire", SetShooting);
        buttonActions.Add("Accelerate", SetBuff <Buffs.Madness>);
    }
示例#3
0
 protected override void AddComponentsToBullet(GameObject bullet)
 {
     base.AddComponentsToBullet(bullet);
     DamageSource.AddToGameObject <DS_Bullet> (bullet, this.damage, UnitSide.usPlayer);
 }
示例#4
0
 protected override void AddComponentsToBullet(GameObject bullet)
 {
     base.AddComponentsToBullet(bullet);
     DamageSource.AddToGameObject <DS_Bullet> (bullet, this.damage, UnitSide.usEnemy);
     PlaySound.BulletShot();
 }