public void cbClickRestButton(Object target, params object[] args)
    {
        Debug.Log("Should make the rest button into a standard action button");
        Skill skillRest = ContLocalUIInteraction.Get().chrSelected.skillRest;

        ContLocalUIInteraction.Get().ChooseSkillToSelect(skillRest);
    }
Esempio n. 2
0
 public void cbCancelSelectionProcess(Object target, params object[] args)
 {
     //End the local selection process for this target, including
     // cleaning up any local-setup for chosing this target (like spawned UI)
     EndLocalSelection();
     ContLocalUIInteraction.Get().CancelSelectionsProcess();
 }
    public void cbReselectChar(Object target, params object[] args)
    {
        // If we now click on a different character, then we'll select them instead
        ContLocalUIInteraction.Get().chrSelected.Idle(); // Need to deselect our current character first
        ContLocalUIInteraction.Get().chrSelected = ((ViewChr)target).mod;

        ContLocalUIInteraction.Get().SetState(new StateTargetSelected());
    }
Esempio n. 4
0
    protected override void OnStartLocalSelection()
    {
        //TODO:: Figure out how to do good highlighting for valid skillslots

        //Allow the local player to click on characters to view and select their skills
        ContLocalUIInteraction.Get().bCanSelectCharacters = true;

        //Set up the character-click triggers
        ViewSkill.subAllClick.Subscribe(cbClickSelectable);
    }
Esempio n. 5
0
    protected override void OnEndLocalSelection()
    {
        //TODO:: Unhighlight ALL skillslots

        //Remove the character-click triggers
        ViewSkill.subAllClick.UnSubscribe(cbClickSelectable);

        //Set our local selection state to idle since we don't want the character's skills window to still be up after clicking one
        ContLocalUIInteraction.Get().SetState(new StateTargetIdle());
    }
Esempio n. 6
0
    override public void OnEnter()
    {
        if (ContLocalUIInteraction.Get().chrSelected != null)
        {
            ContLocalUIInteraction.Get().chrSelected.Idle();
        }
        ContLocalUIInteraction.Get().chrSelected = null;


        ViewChr.subAllClick.Subscribe(cbClickChar);
    }
Esempio n. 7
0
    protected override void OnStartLocalSelection()
    {
        //Highlight all the targettable characters
        foreach (Chr c in GetValidSelectable(ContLocalUIInteraction.Get().selectionsInProgress))
        {
            //Pass along the skill we're trying to select targets for
            c.subBecomesTargettable.NotifyObs(null, ContLocalUIInteraction.Get().selectionsInProgress.skillslotSelected);
        }

        //Set up the character-click triggers
        ViewChr.subAllClick.Subscribe(cbClickSelectable);
    }
Esempio n. 8
0
    public void AttemptSelection(object objSelected)
    {
        Debug.Log("Attempted to select " + objSelected);
        if (IsValidSelection(objSelected, ContLocalUIInteraction.Get().selectionsInProgress) == false)
        {
            Debug.Log("Invalid selection attempted!");
            return;
        }

        //The selection is valid at this point so we can submit it to the LocalUIInteraction's built-up list
        ContLocalUIInteraction.Get().ReceiveNextSelection(objSelected);
    }
    override public void OnEnter()
    {
        Debug.Assert(ContLocalUIInteraction.Get().chrSelected != null);

        ViewBackground.subAllBackgroundClick.Subscribe(cbDeselect);
        ViewChr.subAllClick.Subscribe(cbReselectChar);
        ViewSkill.subAllClick.Subscribe(cbClickSkill);
        ViewRestButton.subAllClick.Subscribe(cbClickRestButton);
        KeyBindings.SetBinding(cbClickRestButton, KeyCode.Space);

        ContLocalUIInteraction.Get().chrSelected.Select();
    }
Esempio n. 10
0
    protected override void OnStartLocalSelection()
    {
        //Highlight all the targettable positions
        foreach (Position p in GetValidSelectable(ContLocalUIInteraction.Get().selectionsInProgress))
        {
            //Pass along the skill we're trying to select targets for
            Debug.Log("About to let " + p + " know that it is selectable with sub " + p.subBecomesTargettable);
            Debug.Log("Selecting for " + ContLocalUIInteraction.Get().selectionsInProgress.skillslotSelected);
            p.subBecomesTargettable.NotifyObs(null, ContLocalUIInteraction.Get().selectionsInProgress.skillslotSelected);
        }

        //Set up the position-click triggers
        ViewPosition.subAllClick.Subscribe(cbClickSelectable);
    }
Esempio n. 11
0
    public void cbClickChar(Object target, params object[] args)
    {
        //Debug.Log("Clicked a Char with bCanSelectCharacters = " + ContLocalUIInteraction.Get().bCanSelectCharacters);

        //Only procede if we're allowed to select characters currently
        if (ContLocalUIInteraction.Get().bCanSelectCharacters == false)
        {
            return;
        }

        ContLocalUIInteraction.Get().chrSelected = ((ViewChr)target).mod;

        ContLocalUIInteraction.Get().SetState(new StateTargetSelected());
    }
 public void cbDeselect(Object target, params object[] args)
 {
     ContLocalUIInteraction.Get().SetState(new StateTargetIdle());
 }
 public void cbClickSkill(Object target, params object[] args)
 {
     ContLocalUIInteraction.Get().ChooseSkillToSelect(((ViewSkill)target).mod);
 }
Esempio n. 14
0
 public void cbStartTargetting(Object target, params object[] args)
 {
     SetSkillFocus(ContLocalUIInteraction.Get().selectionsInProgress.skillslotSelected.skill);
     bLocked = true;
 }