/**End Arg Update*/ public void UpdateSubCommand(SubCommand.Code newSubCode) { DestructSubCMD(); switch (newSubCode) { case SubCommand.Code.Boss: subCommandRef = (Instantiate(Resources.Load("BossCMDPrefab", typeof(SubCommand))) as SubCommand); break; case SubCommand.Code.Distrust: subCommandRef = (Instantiate(Resources.Load("DistrustCMDPrefab", typeof(SubCommand))) as SubCommand); break; case SubCommand.Code.Zero: subCommandRef = (Instantiate(Resources.Load("ZeroCMDPrefab", typeof(SubCommand))) as SubCommand); break; case SubCommand.Code.One: subCommandRef = (Instantiate(Resources.Load("OneCMDPrefab", typeof(SubCommand))) as SubCommand); break; } subCommandRef.transform.SetParent(transform); subCommandRef.transform.localPosition = new Vector2(80.0f, 0.0f); foreach (Transform child in subCommandRef.transform) { child.gameObject.SetActive(false); } }
void Start() { distrustTopCode = new TopCommand.Code[6]; distrustSubCode = new SubCommand.Code[6]; distrustTopCode[0] = TopCommand.Code.Inbox; distrustSubCode[0] = SubCommand.Code.NoAction; distrustTopCode[1] = TopCommand.Code.Store; distrustSubCode[1] = SubCommand.Code.One; distrustTopCode[2] = TopCommand.Code.Inbox; distrustSubCode[2] = SubCommand.Code.NoAction; distrustTopCode[3] = TopCommand.Code.Outbox; distrustSubCode[3] = SubCommand.Code.Distrust; distrustTopCode[4] = TopCommand.Code.Load; distrustSubCode[4] = SubCommand.Code.One; distrustTopCode[5] = TopCommand.Code.Outbox; distrustSubCode[5] = SubCommand.Code.Distrust; playerInbox.Initialise(new Vector2(-344f, 251f), InitialInboxGenerator()); playerOutbox.Initialise(new Vector2(-83f, -171f)); distrustInboxPos = new Vector2(-436f, -111f); distrustOutbox.Initialise(new Vector2(-83f, 132f)); memoryBar.Initialise(InitialMemoryPickupPos()); debugPan.debugButtons[(int)ButtonCode.Run].onClick.AddListener(() => StartRunning()); debugPan.debugButtons[(int)ButtonCode.Stop].onClick.AddListener(() => Reset()); linkMenuEntry(); Reset(); }
void IUpdateSubCMDChoice.FinaliseSubCMDChoice(SubCommand.Code updateCode) { foreach (TopCommandSlot s in GameObject.FindObjectsOfType <TopCommandSlot>()) { s.ActivateEventTrigger(true); } UpdateSubCommand(updateCode); }
override protected void SetEndPositionBySubCMD(AnimatorController character, SubCommand.Code subCode) { if (subCode == SubCommand.Code.Boss) { character.SetEndPosition(playerOutbox.playerPos); } else { Debug.Log("Should not reach here."); } }
override protected void SetEndPositionBySubCMD(AnimatorController character, SubCommand.Code subCode) { if (subCode == SubCommand.Code.Boss) { character.SetEndPosition(playerOutbox.playerPos); } else if (subCode == SubCommand.Code.Distrust) { character.SetEndPosition(distrustOutbox.playerPos); } }
override protected void SetEndPositionBySubCMD(AnimatorController character, SubCommand.Code subCode) { if (subCode == SubCommand.Code.Boss) { character.SetEndPosition(playerOutbox.playerPos); } else if (subCode == SubCommand.Code.Distrust) { character.SetEndPosition(distrustOutbox.playerPos); } else if (subCode == SubCommand.Code.Zero) { character.SetEndPosition(memoryBar.getPickupPos(0)); } else if (subCode == SubCommand.Code.One) { character.SetEndPosition(memoryBar.getPickupPos(1)); } }
protected override void SetEndPositionBySubCMD(AnimatorController character, SubCommand.Code subCode) { switch (subCode) { case SubCommand.Code.Boss: character.SetEndPosition(playerOutbox.playerPos); break; case SubCommand.Code.Distrust: character.SetEndPosition(distrustOutbox.playerPos); break; case SubCommand.Code.Zero: character.SetEndPosition(memoryBar.getPickupPos(0)); break; case SubCommand.Code.One: character.SetEndPosition(memoryBar.getPickupPos(1)); break; } }
virtual protected void SetEndPositionBySubCMD(AnimatorController character, SubCommand.Code subCode) { }