Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     skills = GameObject.FindGameObjectWithTag("Controller").GetComponent<SkillList>();
     magic = GameObject.FindGameObjectWithTag("Controller").GetComponent<MagicList>();
     Items = GameObject.FindGameObjectWithTag("Controller").GetComponent<AllItemsList>();
     Equipment = GetComponent<CharacterEquipment>();
     skillsKnown = new Dictionary<string, int>();
     magicKnown = new Dictionary<string, int>();
     skillsKnown.Add("Attack", 100);
     skillsKnown.Add("Block", 100);
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        AllItems = GetComponent<AllItemsList>();

        items = new List<string>();
        itemQuantity = new Dictionary<string, int>();
        itemsEquipped = new Dictionary<string, int>();
        itemType = new Dictionary<string, string>();
        categorisedItems = new Dictionary<string, List<string>>();

        //set categories
        categorisedItems.Add("Armour", new List<string>());
        categorisedItems.Add("Weapon", new List<string>());
        categorisedItems.Add("Accessory", new List<string>());
        categorisedItems.Add("Item", new List<string>());
    }
Ejemplo n.º 3
0
    // Use this for initialization
    void Awake()
    {
        skillInfo = new Dictionary<string, string[]>();
        Items = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<AllItemsList>();

        SkillData = Resources.Load("Data/AllSkills") as TextAsset;
        LoadSkillData();
    }
Ejemplo n.º 4
0
 //DESIGN: Inventory GUI
 public void ToggleInventory()
 {
     inventoryOpen = !inventoryOpen;
     Inv = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<Inventory>();
     ItemsList = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<AllItemsList>();
 }
Ejemplo n.º 5
0
    //ADD: Magic
    void Awake()
    {
        //initialize all component variables
        Stats = GetComponent<AttributesScript>();
        KnownAbilities = GetComponent<CharacterKnownAbilities>();
        Status = GetComponent<CharacterStatus>();
        Equipment = GetComponent<CharacterEquipment>();

        Move = GameObject.FindGameObjectWithTag("Controller").GetComponent<MovementScript>();
        pathFind = GameObject.FindGameObjectWithTag("Controller").GetComponent<PathfindingScript>();
        findValid = GameObject.FindGameObjectWithTag("Controller").GetComponent<FindValidPoints>();
        Draw = GameObject.FindGameObjectWithTag("Controller").GetComponent<DrawSquaresScript>();
        Controller = GameObject.FindGameObjectWithTag("Controller").GetComponent<TurnController>();
        Magic = GameObject.FindGameObjectWithTag("Controller").GetComponent<MagicList>();
        Skills = GameObject.FindGameObjectWithTag("Controller").GetComponent<SkillList>();

        Items = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<AllItemsList>();
        if(GetComponent<MouseControlScript>()){
            Mouse = GetComponent<MouseControlScript>();
            isPlayer = true;
        }

        skillSelected = "";
    }
Ejemplo n.º 6
0
 void Awake()
 {
     Items = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<AllItemsList>();
     Inv = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<Inventory>();
 }