コード例 #1
0
 public Move()
 {
     this.reserve  = PawnDef.NONE;
     this.upgrade  = false;
     this.priority = 0;
     from          = new MovePawn();
     to            = new MovePawn();
 }
コード例 #2
0
 private void DeclareSingleton()
 {
     // Found a duplicate instance of this class, destroy it!
     if (singleton != null && singleton != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         // Create singleton instance
         singleton = this;
     }
 }
コード例 #3
0
    //public GameObject MyGameObject;

    // Start is called before the first frame update
    void Start()
    {
        coin              = GetComponent <MovePawn>();
        MovePawn.UseCoin += CoinReady;
        StartCoroutine(TextCoroutine());
    }
コード例 #4
0
ファイル: MenuButtonClick.cs プロジェクト: todun/leVRn
    void ButtonClicked(GameObject buttonName)
    {
        switch (buttonName.name)
        {
        case "Play":
            titleScreen.ClickedPlay();
            break;

        case "Level1":
            titleScreen.ClickedFunctions();
            break;

        case "MoveForward":
            functionControl.ClickedMoveForward();
            break;

        case "MoveLeft":
            functionControl.ClickedMoveLeft();
            break;

        case "MoveRight":
            functionControl.ClickedMoveRight();
            break;

        case "MoveBack":
            functionControl.ClickedMoveBack();
            break;

        case "Next":
            titleScreen.NextInstruction();
            break;

        case "Back":
            titleScreen.PreviousInstruction();
            break;

        case "Cancel":
            titleScreen.ClickedCancel();
            break;

        case "Run":
            MovePawn movePawn = GameObject.FindGameObjectWithTag("pawn").GetComponent <MovePawn>();
            movePawn.RunSimulation();
            break;

        case "Del":
            functionControl.Del();
            break;

        case "Settings":
            titleScreen.ClickedSettings();
            break;

        case "Restart":
            titleScreen.Restart();
            break;

        case "Blue":
            settingsControl.ChangeTheme(SettingsControl.Theme.blue, buttonName);
            break;

        case "Red":
            settingsControl.ChangeTheme(SettingsControl.Theme.red, buttonName);
            break;

        case "Pink":
            settingsControl.ChangeTheme(SettingsControl.Theme.pink, buttonName);
            break;

        case "White":
            settingsControl.ChangeTheme(SettingsControl.Theme.white, buttonName);
            break;

        case "Black":
            settingsControl.ChangeTheme(SettingsControl.Theme.black, buttonName);
            break;

        case "Apply":
            settingsControl.ApplySettings();
            break;

        case "Explore":
            titleScreen.Explore();
            break;
        }
    }