コード例 #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);
 }
コード例 #2
0
ファイル: Inventory.cs プロジェクト: Zaeran/TacticalRPG
    // 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>());
    }
コード例 #3
0
ファイル: SkillList.cs プロジェクト: Zaeran/TacticalRPG
    // 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();
    }
コード例 #4
0
ファイル: InventoryGUI.cs プロジェクト: Zaeran/TacticalRPG
 //DESIGN: Inventory GUI
 public void ToggleInventory()
 {
     inventoryOpen = !inventoryOpen;
     Inv = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<Inventory>();
     ItemsList = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<AllItemsList>();
 }
コード例 #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 = "";
    }
コード例 #6
0
 void Awake()
 {
     Items = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<AllItemsList>();
     Inv = GameObject.FindGameObjectWithTag("ItemManager").GetComponent<Inventory>();
 }