コード例 #1
0
ファイル: InventoryUI.cs プロジェクト: Titwin/TinyWorld
 private void Start()
 {
     viewer.SetActive(activated);
     trashDefaultColor = trash.border.color;
     backgroundEquiped = backgroundWeapon.color;
     ResetState();
     interactionUI = GetComponent <InteractionUI>();
 }
コード例 #2
0
    private void Start()
    {
        questController = QuestController.Instance;
        interactionUI   = InteractionUI.Instance;

        if (quest != null && quest.done)
        {
            LoadNextQuest();
        }
    }
コード例 #3
0
    public void OnAddButtonClicked()
    {
        GameObject newDisplayerUI = Instantiate <GameObject>(displayUIPrefab);

        newDisplayerUI.transform.SetParent(contentDisplay.transform);
        newDisplayerUI.transform.localScale = Vector3.one;
        newDisplayerUI.SetActive(true);
        InteractionUI <T> interactionUI = newDisplayerUI.GetComponent <InteractionUI <T> >();

        interactionUI.addInteractionParentUI = this;
        prefabUIList.Add(interactionUI);
        UpdateInteractionHandler(interactionUI);
    }
コード例 #4
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     //DontDestroyOnLoad(gameObject);
     interactionUI.SetActive(false);
 }
コード例 #5
0
    // Use this for initialization
    void Awake()
    {
        interactionUI = GameObject.Find("UI/Interaction").GetComponent <InteractionUI>();
        playerUI      = GameObject.Find("UI/Player").GetComponent <PlayerUI>();
        aircraftUI    = GameObject.Find("UI/Aircraft").GetComponent <AircraftUI>();
        polarcurveUI  = GameObject.Find("UI/PolarCurve").GetComponent <PolarCurveUI>();
        environmentUI = GameObject.Find("UI/Environment").GetComponent <EnvironmentUI>();


        VRTK_ControllerEvents controllerEvents = transform.parent.GetComponent <VRTK_ControllerEvents>();

        controllerEvents.TriggerPressed  += new ControllerInteractionEventHandler(TriggerPressed);
        controllerEvents.TriggerReleased += new ControllerInteractionEventHandler(TriggerReleased);
    }
コード例 #6
0
    public override void OnStartClient()
    {
        wateringCooldowns.Callback    += OnWateringCooldownUpdate;
        fertilizingCooldowns.Callback += OnFertilizingCooldownUpdate;
        seedInventory.Callback        += OnInventoryUpdate;

        interacUI = GameObject.FindWithTag("InteracUI").GetComponent(typeof(InteractionUI)) as InteractionUI;
        interacUI.claimUI(this);

        /* TEST VARS
         * GameObject playerObj = NetworkClient.localPlayer.gameObject;
         * ownGarden = playerObj.GetComponent(typeof(NetworkIdentity)) as NetworkIdentity;
         * currentGarden = ownGarden;
         */
    }
コード例 #7
0
    public void Interact(PlayerShipController player)
    {
        Debug.Log("Oh no you friccin moron, you just got INTERACTED! Tag your friend to totally INTERACT them.");
        InteractionUI window = GameObject.Instantiate(Resources.Load("Prefabs/UI/InteractionWindow") as GameObject).GetComponent <InteractionUI>();

        window.transform.SetParent(GameObject.Find("ScreenUI").transform, false);
        window.player = player;
        window.source = this;
        RectTransform t = (RectTransform)window.transform;

        t.offsetMax = Vector2.zero;
        foreach (OrbitalInteraction i in interactions)
        {
            window.AddTab(i);
        }
    }
コード例 #8
0
    private void InitializeInteractionUI(InteractionUI interactionUI, Interaction interaction)
    {
        var symbolCount = interaction.danceMovesSetToApply.Count;

        interactionUI.Initialize(interaction.interactionSymbol, interaction.GetDescription(), symbolCount);
        if (!interaction.visibility.visibleOnUI)
        {
            interactionUI.gameObject.SetActive(false);
        }

        for (var i = 0; i < symbolCount; i++)
        {
            var    danceMove = interaction.danceMovesSetToApply[i];
            Sprite sprite;
            if (!danceMove.lockedState.locked)
            {
                sprite = arrows[danceMove.danceMove];
            }
            else
            {
                switch (danceMove.lockedState.lockedType)
                {
                case Interaction.LockedType.CanGuess:
                    sprite = unknownSymbol;
                    break;

                case Interaction.LockedType.OnlyWhenKnown:
                    sprite = lockedUnknownSymbol;
                    break;

                default:
                    throw new ArgumentOutOfRangeException();
                }
            }

            interactionUI.AddSymbol(sprite, i);
        }
    }
コード例 #9
0
 private void Awake()
 {
     interactionUI = GetComponentInChildren <InteractionUI>();
 }
コード例 #10
0
 private void Start()
 {
     interactionUI = InteractionUI.Instance;
 }
コード例 #11
0
 private void Start()
 {
     uiController  = UIController.Instance;
     interactionUI = InteractionUI.Instance;
 }
コード例 #12
0
ファイル: NPCTalk.cs プロジェクト: gdemirev01/Avija_Tues_Fest
 private void Start()
 {
     interactionUI = InteractionUI.Instance;
     questController = QuestController.Instance;
 }
コード例 #13
0
 public abstract void UpdateInteractionHandler(InteractionUI <T> interactionUI);
コード例 #14
0
 public override void UpdateInteractionHandler(InteractionUI <FlockBehavior> interactionUI)
 {
     parent.saveSystem.CurrentData.AddBehavior();
 }
コード例 #15
0
 public override void UpdateInteractionHandler(InteractionUI <BoidInteraction> interactionUI)
 {
     parent.saveSystem.CurrentData.addVrInteraction(null, true);
 }
コード例 #16
0
 public void Bind(InteractionUI window, InteractionTab tab)
 {
     this.window = window;
     this.tab    = tab;
 }
コード例 #17
0
 public override void UpdateInteractionHandler(InteractionUI <GeneticBehavior> interactionUI)
 {
     parent.saveSystem.CurrentData.AddGene(targetPrefabs[0]);
 }
コード例 #18
0
 public override void UpdateInteractionHandler(InteractionUI <BoidInteraction> interactionUI)
 {
 }
コード例 #19
0
ファイル: InteractionUI.cs プロジェクト: Titwin/TinyWorld
 private void Awake()
 {
     instance = this;
 }