示例#1
0
 public override void Initialize <T>(T data, bool isWink)
 {
     effect      = data as Resource.Effect;
     this.isWink = isWink;
     Debug.Log($"{effect.spritePath}");
     GetComponent <Image>().sprite = Resources.Load <Sprite>(effect.spritePath);
     SetDescription();
 }
示例#2
0
 void ApplyItemEffect(Character character, Resource.Effect effect, bool isAlreadySameEffectActive)
 {
     if (!isAlreadySameEffectActive)
     {
         //  Debug.Log("Applying Effect" + effect.name);
         GameObject effectTimerGO = new GameObject(character.Name + ":" + effect.name);
         effectTimerGO.transform.SetParent(CharacterManager.Instance.gameObject.transform.Find("ItemEffectTimer"));
         effectTimerGO.AddComponent <ItemEffectTimer>().StartEffect(character, effect);
     }
     else
     {
         GameObject effectTimerGO = CharacterManager.Instance.gameObject.transform.Find("ItemEffectTimer/" + effect.instanceID).gameObject;
         effectTimerGO.GetComponent <ItemEffectTimer>().IncreaseDuration(effect.duration);
         //  Debug.Log(effectTimerGO.name);
     }
 }
示例#3
0
    public void StartEffect(Character _character, Resource.Effect _effect)
    {
        character = _character;

        effect = _effect;
    }