Example #1
0
 public override void StartUp(Entity entity, float time)
 {
     VFXBurnt = pool.Spawn(id_fire, entity.transform.position, Quaternion.identity) as ControlPartice;
     VFXBurnt.Play();
     target = entity;
     VFXBurnt.transform.localScale = new Vector3(entity.size.x, entity.size.y, 1);
     VFXBurnt.transform.position   = target.center;
     target.Harmful_Fire           = true;
     target.OnValueChanged?.Invoke(Entity.HARMFUL_FIRE);
     SetLissener(true);
     AddTime(time);
 }
Example #2
0
 public override void StartUp(Entity entity, float time)
 {
     VFXPoison = pool.Spawn(id_poison, entity.center, Quaternion.identity) as ControlPartice;
     VFXPoison.transform.localScale = new Vector3(entity.size.x, entity.size.y, 1);
     VFXPoison.Play();
     if (entity != null)
     {
         target = entity;
         target.Harmful_Poison = true;
         target.OnValueChanged?.Invoke(Entity.HARMFUL_POISON);
         SetLissener(true);
     }
     AddTime(time);
 }
Example #3
0
    public static void LoadData()
    {
        // Load Prefabs
        FirePrefab           = Resources.Load <ControlPartice>("Prefabs/VFXBurnt");
        PoisonPrefab         = Resources.Load <ControlPartice>("Prefabs/VFXPoison");
        DustPrefab           = Resources.Load <Dust>("Prefabs/Bui");
        SelectingEnemyPrefab = Resources.Load <Selecting>("Prefabs/SelectingEnemy");
        giatDien             = Resources.Load <AnimationQ>("Prefabs/VFXGiatDien");
        IcePrefab            = Resources.Load <SpriteRenderer>("Prefabs/Ice");
        // Load Sprites

        SpritesDust = Resources.LoadAll <Sprite>("Sprites/bui");
        SpritesIce  = Resources.LoadAll <Sprite>("Sprites/Ices");

        // LoadPooling
        PoolingParrent = new GameObject("PoolingParrent").transform;
        PoolingParrent.transform.parent = GameController.Instance.transform;
        IDPooling_Fire   = PoolingGameObject.PoolingMain.AddPrefab(FirePrefab);
        IDPooling_Dust   = PoolingGameObject.PoolingMain.AddPrefab(DustPrefab);
        IDPooling_Poison = PoolingGameObject.PoolingMain.AddPrefab(PoisonPrefab);

        Debug.Log("VFX Loaded");
    }
Example #4
0
 public TakeHitWithPartice(ITakeHit take, ControlPartice con)
 {
     this.take    = take;
     this.control = con;
 }
 protected override void OnDestroyed(ControlPartice VFX)
 {
     VFX.SetStartColor(colorCurrent);
     base.OnDestroyed(VFX);
 }
Example #6
0
 protected virtual void OnDestroyed(ControlPartice VFX)
 {
     VFX.Play();
 }