Exemple #1
0
        public SkillSlotUI(ref SKillSlotUIPositionInput SKillSlotUIPositionInput)
        {
            var instanciatedObject = MonoBehaviour.Instantiate(SkillSlotUIGlobalConfigurationGameObject.Get().SkillSlotUIGlobalConfiguration.SkillSlotUIBasePrefab, CoreGameSingletonInstances.GameCanvas.transform);

            this.SkillSlotUIGameObject = instanciatedObject.GetComponent <SkillSlotUIGameObject>();

            this.SkillSlotUIGameObject.Init();

            this.SkillSlotUIGameObject.PositionAndScaleSkillSlot(ref SKillSlotUIPositionInput);
        }
Exemple #2
0
 public void UpdateSkillSlotUIFromSkillActionDefinition(SkillActionDefinition SkillActionDefinition)
 {
     if (SkillActionDefinition != null)
     {
         this.SkillSlotUIconIGameObject.SetUIIcon(SkillActionDefinition.SkillIcon);
         if (SkillActionDefinition.SkillActionConstraint == SkillActionConstraint.LOW_HEALTH_ONLY)
         {
             this.SkillIconBackgroundMaterialInstance.SetColor("_BackgroundColor", SkillSlotUIGlobalConfigurationGameObject.Get().SkillSlotUIGlobalConfiguration.LowOnHealthConstrainedBackgroundColor);
         }
     }
 }