public void OnPointerClick(PointerEventData eventData) { Image image = this.gameObject.GetComponent <Image>(); if (skillTreeHandler == null) { skillTreeHandler = SkillTreeHandler.skillTreeHandler; } /*if (eventData.button == PointerEventData.InputButton.Left) { * if(skillTreeHandler.clickSkill(this)) { * if(pressed == 0) { * pressed = 1; * image.color = Color.red; * } * } * } * else if (eventData.button == PointerEventData.InputButton.Right) { * if(skillTreeHandler.rightClickSkill(this)) { * if(pressed == 1) { * pressed = 0; * image.color = Color.white; * } * } * }*/ }
// Use this for initialization void Start () { skillTreeHandler = this; if(!loadSkillsFromDisk()) { skilltree = new SkillTree(); } else { skilltree = GameSave.current.skilltree; } /*for(int a=0;a!=transform.childCount;++a) { SkillButton button = transform.GetChild(a).GetComponent<SkillButton>(); for(int b=0;b!=skilltree.skillLevel;++b) { if(skilltree.skills[b].skillType == button.skillType) { button.skillCount = skilltree.skills[b].skillCount; button.LoadedClick(); break; } } }*/ }
public void OnPointerClick(PointerEventData eventData) { Image image = this.gameObject.GetComponent<Image>(); if(skillTreeHandler == null) { skillTreeHandler = SkillTreeHandler.skillTreeHandler; } /*if (eventData.button == PointerEventData.InputButton.Left) { if(skillTreeHandler.clickSkill(this)) { if(pressed == 0) { pressed = 1; image.color = Color.red; } } } else if (eventData.button == PointerEventData.InputButton.Right) { if(skillTreeHandler.rightClickSkill(this)) { if(pressed == 1) { pressed = 0; image.color = Color.white; } } }*/ }
// Use this for initialization void Start() { skillTreeHandler = this; if (!loadSkillsFromDisk()) { skilltree = new SkillTree(); } else { skilltree = GameSave.current.skilltree; } /*for(int a=0;a!=transform.childCount;++a) { * SkillButton button = transform.GetChild(a).GetComponent<SkillButton>(); * for(int b=0;b!=skilltree.skillLevel;++b) { * if(skilltree.skills[b].skillType == button.skillType) { * button.skillCount = skilltree.skills[b].skillCount; * button.LoadedClick(); * break; * } * } * }*/ }
void Start() { oriTrans = transform; skillTreeHandler = SkillTreeHandler.skillTreeHandler; //transform.parent.gameObject.GetComponent<SkillTreeHandler>(); }
void Start() { oriTrans = transform; skillTreeHandler = SkillTreeHandler.skillTreeHandler;//transform.parent.gameObject.GetComponent<SkillTreeHandler>(); }