mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交
This commit is contained in:
32
JNFrame/Assets/Script/battle/mode/GWorldSceneMode.cs
Normal file
32
JNFrame/Assets/Script/battle/mode/GWorldSceneMode.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Script.battle.mode
|
||||
{
|
||||
public class GWorldSceneModeInput
|
||||
{
|
||||
|
||||
}
|
||||
public class GWorldSceneMode:GBaseMode<GWorldSceneModeInput>
|
||||
{
|
||||
|
||||
public GameObject ball;
|
||||
|
||||
// public override void OnSyncLoad()
|
||||
// {
|
||||
// base.OnSyncLoad();
|
||||
// Instantiate(ball,this.transform);
|
||||
// }
|
||||
|
||||
public override void OnSyncUpdate(int dt, JNFrameInfo frame, GWorldSceneModeInput input)
|
||||
{
|
||||
if (frame.Index > 0)
|
||||
{
|
||||
var ballNode = Instantiate(ball,this.transform);
|
||||
var transformPosition = ballNode.transform.position;
|
||||
ballNode.transform.position = new Vector3(transformPosition.x,transformPosition.y,GetSync().nRandomInt(-3,3));
|
||||
}
|
||||
Debug.Log("OnSyncUpdate");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e57d6502487241f9826136613eff59a2
|
||||
timeCreated: 1706519435
|
Reference in New Issue
Block a user