Ejemplo n.º 1
0
    private void Awake()
    {
        if (null == instance)
        {
            instance = this;
            transform.SetParent(null);
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
            return;
        }

        foreach (var entry in Serialized_FX_Dict)
        {
            FX_Dict[entry.key]       = entry.value;
            onesieChecker[entry.key] = entry.onesie;
        }
        if (FX_Dict.ContainsKey(FXType.Default))
        {
            FX_Dict[FXType.Default]       = null;
            onesieChecker[FXType.Default] = false;
        }
        holder = new UnityEngine.GameObject("FX Objects");
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        if (null == instance)
        {
            instance = this;
            DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        holder = new GameObject("FX Objects");
    }
Ejemplo n.º 3
0
 private void Awake()
 {
     if (null == instance)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
     holder = new GameObject("FX Objects");
     fx_objs.AddRange(new GameObject[] {
         hit_fx,
         wall_fx,
         death_fx,
         win_fx,
     });
 }