public override void OnInspectorGUI() { MarbleScript ms = (MarbleScript)target; // healthBar.currentHealth = EditorGUILayout.Slider("Current Health", healthBar.currentHealth, 0, healthBar.maxHealth); //serializedObject.Update(); EditorGUI.BeginChangeCheck(); ms.radius = EditorGUILayout.Slider("Radius", ms.radius, 0, 100); DrawDefaultInspector(); if (EditorGUI.EndChangeCheck()) { Debug.Log("something changed"); // rebuild the art and scale } }
public Minimax(NpcBehaviour npc, MarbleScript marble, NewTileScript tileToMoveTo, GameManager gameManager, List <NewTileScript> previousTiles, bool jump) { this.bestNode = this; score = -Mathf.Infinity; this.npc = npc; this.jump = jump; this.marble = marble; this.tileToMoveTo = tileToMoveTo; this.gameManager = gameManager; this.previousTiles = previousTiles; gameManager.MoveMarbleScript(marble.gameObject, tileToMoveTo.gameObject); previousTiles.Add(tileToMoveTo); if (jump && gameManager.playerList[(gameManager.playerList.IndexOf(marble.Player.PlayerColor) + 1) % gameManager.playerList.Count] + "Player" != gameManager.CurrentPlayer) { gameManager.MarblePicked(marble.gameObject, tileToMoveTo.gameObject, true, this, npc); } else { bestNode = this; } gameManager.StartMinimax(this); }
public PossibleMove(MarbleScript marble, NewTileScript tile) { this.marble = marble; this.tile = tile; }