add new classes
This commit is contained in:
parent
fdcdbdc30a
commit
6deaa4c022
File diff suppressed because one or more lines are too long
10
src/scripts/cores/bmmo/BmmoContext.cs
Normal file
10
src/scripts/cores/bmmo/BmmoContext.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceStalker.Cores.Bmmo {
|
||||
public class BmmoContext {
|
||||
}
|
||||
}
|
10
src/scripts/cores/managers/MultiplayManager.cs
Normal file
10
src/scripts/cores/managers/MultiplayManager.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceStalker.Cores.Managers {
|
||||
public class MultiplayManager {
|
||||
}
|
||||
}
|
10
src/scripts/cores/managers/RecManager.cs
Normal file
10
src/scripts/cores/managers/RecManager.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceStalker.Cores.Managers {
|
||||
public class RecManager {
|
||||
}
|
||||
}
|
10
src/scripts/cores/rec/BmmoSwungRec.cs
Normal file
10
src/scripts/cores/rec/BmmoSwungRec.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceStalker.Cores.Rec {
|
||||
public class BmmoSwungRec {
|
||||
}
|
||||
}
|
55
src/scripts/cores/rec/SpiritTrailRec.cs
Normal file
55
src/scripts/cores/rec/SpiritTrailRec.cs
Normal file
|
@ -0,0 +1,55 @@
|
|||
using BallanceStalker.Cores.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
|
||||
namespace BallanceStalker.Cores.Rec {
|
||||
public class SpiritTrailRec : Utils.IRec {
|
||||
public SpiritTrailRec(string rec_folder) {
|
||||
mIsReady = mIsPlaying = false;
|
||||
Task.Run(() => {
|
||||
// load data
|
||||
|
||||
|
||||
lock (mStatusLock) {
|
||||
mIsReady = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public event Action<long, string> RecRegisterBall;
|
||||
public event Action RecPlaying;
|
||||
public event Action RecPaused;
|
||||
public event Action<long> RecUnregisterBall;
|
||||
|
||||
object mStatusLock;
|
||||
bool mIsReady, mIsPlaying;
|
||||
|
||||
public void Pause() {
|
||||
lock (mStatusLock) {
|
||||
mIsPlaying = false;
|
||||
}
|
||||
}
|
||||
|
||||
public void Play() {
|
||||
lock (mStatusLock) {
|
||||
mIsPlaying = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Seek(float sec) {
|
||||
;
|
||||
}
|
||||
|
||||
public void Tick(float delta_sec, List<RecBallStateReport> report) {
|
||||
lock (mStatusLock) {
|
||||
if (!mIsPlaying || !mIsReady) return;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
30
src/scripts/cores/utils/BallStates.cs
Normal file
30
src/scripts/cores/utils/BallStates.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceStalker.Cores.Utils {
|
||||
public enum BallType : UInt32 {
|
||||
Stone,
|
||||
Wood,
|
||||
Paper
|
||||
}
|
||||
|
||||
public struct VxVector {
|
||||
float X, Y, Z;
|
||||
}
|
||||
public struct VxQuaternion {
|
||||
float X, Y, Z, W;
|
||||
}
|
||||
public struct VxBallState {
|
||||
VxVector Pos;
|
||||
VxQuaternion Quat;
|
||||
}
|
||||
|
||||
public struct RecBallStateReport {
|
||||
long Identifier;
|
||||
VxBallState BallState;
|
||||
}
|
||||
|
||||
}
|
10
src/scripts/cores/utils/IMultiplay.cs
Normal file
10
src/scripts/cores/utils/IMultiplay.cs
Normal file
|
@ -0,0 +1,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceStalker.Cores.Utils {
|
||||
public interface IMultiplay {
|
||||
}
|
||||
}
|
27
src/scripts/cores/utils/IRec.cs
Normal file
27
src/scripts/cores/utils/IRec.cs
Normal file
|
@ -0,0 +1,27 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BallanceStalker.Cores.Utils {
|
||||
public interface IRec {
|
||||
void Play();
|
||||
void Pause();
|
||||
void Seek(float sec);
|
||||
void Tick(float delta_sec, List<RecBallStateReport> report);
|
||||
|
||||
/// <summary>
|
||||
/// register a ball
|
||||
/// long is identifier, string is name
|
||||
/// </summary>
|
||||
event Action<long, string> RecRegisterBall;
|
||||
event Action RecPlaying;
|
||||
event Action RecPaused;
|
||||
/// <summary>
|
||||
/// unregister a ball
|
||||
/// long is identifier
|
||||
/// </summary>
|
||||
event Action<long> RecUnregisterBall;
|
||||
}
|
||||
}
|
|
@ -16,8 +16,7 @@ namespace BallanceStalker.Scenes {
|
|||
public override void _ExitTree() {
|
||||
BallanceStalker.Cores.BStalkerContext.BSShutdown();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void _Ready() {
|
||||
mMenuManager = GetNode<Gui.MenuManager>("MenuManager");
|
||||
mConsolePanel = GetNode<Gui.ConsolePanel>("ConsolePanel");
|
||||
|
|
|
@ -7,10 +7,9 @@ namespace BallanceStalker.Scenes.Entities {
|
|||
public class ShadowBallManager : Spatial {
|
||||
private Dictionary<Guid, ShadowBall> mBallDict = new Dictionary<Guid, ShadowBall>();
|
||||
private PackedScene mTemplateShadowBall;
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
|
||||
public override void _Ready() {
|
||||
mTemplateShadowBall = ResourceLoader.Load<PackedScene>("res://scenes/stages/ShadowBall.tscn");
|
||||
mTemplateShadowBall = ResourceLoader.Load<PackedScene>("res://scenes/entities/ShadowBall.tscn");
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user