mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
32 lines
867 B
C#
32 lines
867 B
C#
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");
|
|
}
|
|
|
|
}
|
|
} |