Ejemplo n.º 1
0
 public void WriteToFile(BinaryWriter bw)
 {
     bw.Write((byte)Type);
     bw.Write(GetLength());
     bw.Write(ID);
     FXBase.WriteToFile(bw);
 }
Ejemplo n.º 2
0
 public AudioDevice(HIRCObject ParentObject)
 {
     Parent = ParentObject;
     Type   = 0;
     ID     = 0;
     FXBase = new FXBase(Parent);
 }
Ejemplo n.º 3
0
 public FxShareSet(HIRCObject ParentObject)
 {
     Parent = ParentObject;
     Type   = 0;
     ID     = 0;
     FXBase = new FXBase(Parent);
 }
Ejemplo n.º 4
0
 public FxCustom(HIRCObject ParentObject)
 {
     Parent = ParentObject;
     Type   = 0;
     ID     = 0;
     FXBase = new FXBase(Parent);
 }
Ejemplo n.º 5
0
 public void DestroyEffect()
 {
     if (m_Effect != null)
     {
         m_Effect.Destroy();
         Destroy(m_Effect);
         m_Effect = null;
     }
 }
Ejemplo n.º 6
0
 private void StartDrawing(string name, FXBase effect, int technique, PrimitiveTopology mode)
 {
     Camera.Instance.World       = Matrix.Identity;
     activeTexture               = resources.GetResource(name);
     ActiveEffect                = effect;
     ActiveEffect.TechniqueIndex = technique;
     this.mode = mode;
     Reset();
 }
Ejemplo n.º 7
0
        public AudioDevice(HIRCObject ParentObject, BinaryReader br, int iType)
        {
            Type   = iType;
            Parent = ParentObject;
            uint Length = br.ReadUInt32();

            ID     = br.ReadUInt32();
            FXBase = new FXBase(Parent, br);
        }
Ejemplo n.º 8
0
    public void ShowFx(string name, Vector3 pos)
    {
        FXBase _fxbas = FxLoader.Instance.Load <FXBase>(name);

        if (_fxbas != null)
        {
            _fxbas.tran.position = pos;
            _fxbas.OnStart(1);
        }
    }
Ejemplo n.º 9
0
    public void ShowFx(string name, Transform tranParent)
    {
        FXBase _fxbas = FxLoader.Instance.Load <FXBase>(name);

        if (_fxbas != null)
        {
            _fxbas.tran.parent        = tranParent;
            _fxbas.tran.localPosition = Vector3.zero;
            _fxbas.OnStart(1);
        }
    }
Ejemplo n.º 10
0
    protected override void OnUse()
    {
        gameObject.SetActive(true);

        if (null == m_fx)
        {
            string skillName = "Fireball1";
            m_fx = Resources.Load <FXBase>(string.Format("fx/{0}", skillName));
            m_fx = GameObject.Instantiate(m_fx);
            m_fx.transform.parent        = this.transform;
            m_fx.transform.localPosition = Vector3.zero;
        }
    }
Ejemplo n.º 11
0
    public Parameter SetParameter <T> (SetParameterSettings <T> ps)
    {
        FXBase f2 = GetEffect(ps.effectName);

        if (f2 == null)
        {
            return(null);
        }
        else
        {
            return(f2.SetParameter <T> (ps));
        }
    }
Ejemplo n.º 12
0
    public override Parameter SetParameter <T> (SetParameterSettings <T> ps)
    {
        FXBase f2 = GetEffect(ps.effectName);

        if (f2 == null)
        {
            return(null);
        }
        else
        {
            Parameter p = f2.SetParameter <T> (ps);
            UpdateSenders();
            return(p);
        }
    }
Ejemplo n.º 13
0
    public void UpdateData(FXBase f)
    {
        // When an effect has changed, update the data in all the effects below it
        int startPosition = 0;

        for (int i = 0; i < fx.Length; i++)
        {
            if (fx[i] == f)
            {
                startPosition = i;
                break;
            }
        }

        ExchangeDataInEffects(startPosition + 1);
        SetOutputData();
    }
Ejemplo n.º 14
0
    public void cleanUp()
    {
        GetComponent<Transform>().localScale            = Vector3.one;

        m_enemyView.GetComponent<Transform>().rotation  = Quaternion.Euler(Vector3.zero);
        m_enemyView.GetComponent<Transform>().localScale = Vector3.one;
        m_enemyView.gameObject.GetComponent<Transform>().SetParent(null);
        InstanceFactory.instance.freeEnemyView(m_enemyView);
        m_enemyView = null;
        if (m_effect != null)
        {
            m_effect.endEffect();
            m_effect = null;
        }
        m_updateTime = float.MaxValue;
        InstanceFactory.instance.freeEnemy(this);
        SceneManager.instance.getEnemyManager().enemyKilled();
    }
Ejemplo n.º 15
0
 public Entry(FXBase p_Effect, Single p_Lifetime, Single p_BlockTime)
 {
     m_Effect    = p_Effect;
     m_Lifetime  = p_Lifetime;
     m_BlockTime = p_BlockTime;
 }
Ejemplo n.º 16
0
 public void freeEffect(FXBase effect)
 {
     ObjectPoolManager.DestroyPooled(effect.gameObject);
 }
Ejemplo n.º 17
0
        public int GetLength()
        {
            int Length = 4 + FXBase.GetLength();

            return(Length);
        }
Ejemplo n.º 18
0
 public virtual void Init(FXBase fxbase)
 {
 }
Ejemplo n.º 19
0
    public void kill(BeltItem.EffectTypeEnum effectType, bool propagate = false)
    {
        m_hitEffect = effectType;

        m_effect = null;
        switch(effectType)
        {
            case BeltItem.EffectTypeEnum.ETE_FIRE:
                m_effect = EffectsManager.instance.getEffect(Vector2.zero, Quaternion.identity, EffectsManager.FXType.FXT_Fire01);
                break;
            case BeltItem.EffectTypeEnum.ETE_ICE:
                m_effect = EffectsManager.instance.getEffect(Vector2.zero, Quaternion.identity, EffectsManager.FXType.FXT_Ice01);
                break;
            case BeltItem.EffectTypeEnum.ETE_SHOCK:
                m_effect = EffectsManager.instance.getEffect(Vector2.zero, Quaternion.identity, EffectsManager.FXType.FXT_Shock01);
                break;

        }

        if (m_effect != null)
        {
            m_effect.GetComponent<SpriteRenderer>().sortingLayerID = m_enemyView.GetComponent<SpriteRenderer>().sortingLayerID;
            m_effect.GetComponent<SpriteRenderer>().sortingOrder = m_enemyView.GetComponent<SpriteRenderer>().sortingOrder + 1;

            m_effect.GetComponent<Transform>().SetParent(this.GetComponent<Transform>(), false);

            m_effect.triggerEffect();
        }
        if (propagate &&
            effectType != BeltItem.EffectTypeEnum.ETE_NORMAL &&
            effectType != BeltItem.EffectTypeEnum.ETE_HEAVY &&
            effectType == m_enemyView.m_type)
        {
            propagateDir(0, -1, effectType);
            propagateDir(0, 1, effectType);
            propagateDir(-1, 0, effectType);
            propagateDir(1, 0, effectType);
        }

        SceneManager.instance.getUIScript().getEnemyCounter().updateCounter(-1);

        m_states[m_curState].resetState();

        m_updateTime = 0.03f;
        m_curState = (int)StateEnum.SE_DEAD;
    }
Ejemplo n.º 20
0
 private float[] ExchangeData(FXBase f, float[] data)
 {
     return(f.ExchangeData(data));
 }