示例#1
0
 public void UpdateTurn(GameObject character)
 {
     currentCharacter = character;
     Stats = currentCharacter.GetComponent<AttributesScript>();
     Abilities = currentCharacter.GetComponent<CharacterKnownAbilities>();
     Status = currentCharacter.GetComponent<CharacterStatus>();
     Character = currentCharacter.GetComponent<GenericControlsScript>();
 }
    //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 = "";
    }