/// <summary> /// 网格 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Grid_Click(object sender, RoutedEventArgs e) { var pWin = Window.GetWindow(this); GridDemo p = new GridDemo(); pWin.Content = p; }
void Start() { GameManagerGO = GameObject.Find("GameManager"); cont = this.GetComponent <CharacterController>(); grid = GetComponent <GridDemo>(); rend = GetComponent <MeshRenderer>(); position = transform.position; life = maxLife; pickups = 0; blinkenSense = GameObject.Find("Cube.001"); blinkenTod = GameObject.Find("Tod"); //textMaxLife.text = " / 3"; anim = GetComponent <Animator>(); if (enemy != null) { enemy.GetComponent <EnemyStateMachine>(); } }