public UpdateUIModel
     (UpdateUserInterface UpdateUI)
 {
     if (UpdateUI != null)
     {
         this.UpdateUI = UpdateUI;
     }
 }
示例#2
0
    void Start()
    {
        canvas         = (Canvas)FindObjectOfType(typeof(Canvas));
        gameController = (GameController)FindObjectOfType(typeof(GameController));
        assets         = gameController.assets;

        // determine which method we should use on update based on our game type (Local vs Networked)
        if (ApplicationData.GameMode == ApplicationData.GameModes.Local)
        {
            updateInterface = new UpdateUserInterface(UpdateInterfaceLocal);
        }

        else if (ApplicationData.GameMode == ApplicationData.GameModes.Networked)
        {
            P2EnergyBarMask.showMaskGraphic = false;
            P2EnergyBarFill.enabled         = false;
            P2EnergyBar.enabled             = false;
            updateInterface = new UpdateUserInterface(UpdateInterfaceNetworked);
        }
    }