コード例 #1
0
 // Use this for initialization
 void Start()
 {
     eventSystem = SnakeEventManager.Instance;
     eventSystem.UpdateScore += UpdateText;
     eventSystem.GameOver+=GameOver;
     eventSystem.Restart += Restart;
 }
コード例 #2
0
 // Use this for initialization
 void Start()
 {
     _Currentstate = GameState.menu;
     eventSystem = SnakeEventManager.Instance;
     eventSystem.GrowSnake +=IncreaseScore;//bfr gameover was here dnt kknw y
     eventSystem.Restart += Restart ;
     score = 0;
 }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        eventSystem = SnakeEventManager.Instance;
        eventSystem.GameOver += F_Hit;

        headingDirection = new Vector3 (1, 0, 0);
        _snake.Init ();//update size
        StartCoroutine ("SnakeSwap");
        ResetPostion = _snake.Head.position;
        ResetRotation = _snake.Head.rotation;
    }
コード例 #4
0
 // Use this for initialization
 void Start()
 {
     eventSystem = SnakeEventManager.Instance;
     eventSystem.GrowSnake += SpawnFruit;
     createGrid ();
 }