Example #1
0
 public void Awake()
 {
     //Get all of the scripts
     InteractionScript  = GetComponent <InteractionCommands>();
     CommandScript      = GetComponent <Commands>();
     CombatCommands     = GetComponent <CombatCommands>();
     MovementCommands   = GetComponent <MovementCommands>();
     DissectingScript   = GetComponent <DissectInputScript>();
     DialogueScript     = GameObject.FindGameObjectWithTag("UI").GetComponent <Dialogue>();
     PlayerScript       = GetComponent <Player>();
     InterfaceScript    = GameObject.FindGameObjectWithTag("UI").GetComponent <InterfaceScript>();
     ItemNameListScript = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <ItemNameList>();
     GameTurnController = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameTurnController>();
     if (!GameObject.FindGameObjectWithTag("CommandListHolder"))
     {
         Instantiate(gameObject, Vector3.zero, Quaternion.identity);
         gameObject.tag  = "CommandListHolder";
         gameObject.name = "CommandListHolder";
         gameObject.AddComponent <CommandList>();
         CommandListScript = gameObject.GetComponent <CommandList>();
     }
     else
     {
         CommandListScript = GameObject.FindGameObjectWithTag("CommandListHolder").GetComponent <CommandList>();
     }
     LevelScript = GameObject.FindGameObjectWithTag("ScriptHolder").GetComponent <LevelScript>();
 }
Example #2
0
 // Use this for initialization
 void Start()
 {
     base.Start();
     curEmitter = this.GetComponent <EmitterBase>();
     //setDeadValue(null, Color.red);
     HpValue = 50;
     ItemNameList.Add("RedItem");
 }
Example #3
0
 //Use this for initialization
 void Start()
 {
     base.Start();
     curEmitter = this.GetComponent <EmitterBase>();
     //setDeadValue(null,Color.green);
     HpValue = 10;
     ItemNameList.Add("GreenItemBig");
 }