Example #1
0
        void tank_onShoot(Tank sender, Vector2 turretEnd, float azi)
        {
            if (PurviewMgr.IsMainHost)
            {
                ShellNormal shell = new ShellNormal("shell" + shellSum.ToString(), sender, turretEnd, azi, shellSpeed);
                sceneMgr.AddGameObj("shell", shell);

                shell.onCollided += new OnCollidedEventHandler(shell_onCollided);
                shellSum++;
                SyncCasheWriter.SubmitCreateObjMg("shell", typeof(ShellNormal), shell.Name, sender, turretEnd, azi, shellSpeed);
            }

            Sound.PlayCue("CANNON1");
        }
Example #2
0
 void tank_onShoot( Tank sender, Vector2 turretEnd, float azi )
 {
     ShellNormal shell = new ShellNormal( "shell" + shellSum.ToString(), sender, turretEnd, azi, shellSpeed );
     shell.onCollided += new OnCollidedEventHandler( shell_onCollided );
     shellSum++;
     sceneMgr.AddGameObj( "shell", shell );
     Sound.PlayCue( "CANNON1" );
 }
Example #3
0
 void Tank_onShoot( Tank sender, Vector2 turretEnd, float azi )
 {
     ShellNormal newShell = new ShellNormal( "shell" + shellCount.ToString(), sender, turretEnd, azi, shellSpeed );
     newShell.onCollided += new OnCollidedEventHandler( Shell_onCollided );
     newShell.onOverlap += new OnCollidedEventHandler( Shell_onOverlap );
     //scene.AddGameObj( newShell, true, false, false, SceneKeeperCommon.GameObjLayer.lowFlying );
     sceneMgr.AddGameObj( "shell", newShell );
     shootSum++;
     //camera.Focus( newShell );
 }