public GetString(string variableName, string npcName, Conversation conversation) { this.variableName = variableName; if (npcName != null){ GameObject npc = CharacterManager.GetCharacter(npcName); variableSet = ((CharacterState)npc.GetComponent("CharacterState")).GetVariableSet(); } else { variableSet = conversation.GetVariableSet(); } }
public SubtractFromInteger(string variableName, string npcName, NumericOperand operand, Conversation conversation) { this.variableName = variableName; if (npcName != null){ GameObject npc = CharacterManager.GetCharacter(npcName); variableSet = ((CharacterState)npc.GetComponent("CharacterState")).GetVariableSet(); } else { variableSet = conversation.GetVariableSet(); } this.operand = operand; }
public SetString(string variableName, string npcName, StringOperand operand, Conversation conversation) { this.variableName = variableName; if (npcName != null){ GameObject npc = CharacterManager.GetCharacter(npcName); variableSet = ((CharacterState)npc.GetComponent(typeof(CharacterState))).GetVariableSet(); } else { variableSet = conversation.GetVariableSet(); } this.operand = operand; }