void Awake() { gameEntityController = gameObject.GetComponent<GameEntityController>() as GameEntityController; inputController = gameObject.GetComponent<IGameEntityInput>() as IGameEntityInput; networkFieldsDb.GetData(); networkFieldsDef = networkFieldsDb.Clone(); networkFieldsDef.Init(); }
void Awake() { settings = Settings.Instance(); util = Util.Instance; gameEntityController = gameObject.GetComponent<GameEntityController>() as GameEntityController; inputController = gameObject.GetComponent<IGameEntityInput>() as IGameEntityInput; networkFields = gameObject.GetComponent<NetworkFields>() as NetworkFields; }
void Awake() { gameEntityController = gameObject.GetComponent <GameEntityController>() as GameEntityController; inputController = gameObject.GetComponent <IGameEntityInput>() as IGameEntityInput; networkFieldsDb.GetData(); networkFieldsDef = networkFieldsDb.Clone(); networkFieldsDef.Init(); }
public override void OnInspectorGUI() { so.Update(); //db.Clear(); def = db.GetData(); EditorMode(); so.ApplyModifiedProperties(); db.Save(def); EditorUtility.SetDirty(db); }
public void SetNetworkFields(NetworkFields networkFields) { Vector3 forward = transform.forward; forward.y = 0; float heading = Quaternion.LookRotation(forward).eulerAngles.y; networkFields.SetPosition(transform.position); networkFields.SetFloat(GMKeyCode.PlayerSpeed, GetPlayerSpeed()); networkFields.SetFloat(GMKeyCode.Heading, heading); if (!gameEntity.IsNpc()) { networkFields.SetFloat(GMKeyCode.Vaxis, inputController.GetFloat(GMKeyCode.Vaxis)); networkFields.SetFloat(GMKeyCode.Haxis, inputController.GetFloat(GMKeyCode.Haxis)); networkFields.SetBool(GMKeyCode.MouseRight, inputController.GetBool(GMKeyCode.MouseRight)); } }
void Start() { gameEntity = gameObject.GetComponent<IGameEntity>() as IGameEntity; networkFields = gameEntity.GetNetworkFields(); }
void Awake() { networkFields = gameObject.GetComponent<NetworkFields>() as NetworkFields; }
void OnEnable() { myTarget = (NetworkFields)target; so = new SerializedObject(target); prop = so.GetIterator(); }
void Start() { gameEntity = gameObject.GetComponent <IGameEntity>() as IGameEntity; networkFields = gameEntity.GetNetworkFields(); }
void OnEnable() { so = new SerializedObject(target); db = (NetworkFieldsDb)target; def = db.GetData(); EnsureFields(); }