Ejemplo n.º 1
0
    protected override void OnCreateClone(LegacyBuff clone)
    {
        base.OnCreateClone(clone);
        int max = Mathf.Max(sprites.Length, ValueFix100.Length);

        (clone as LegacyBuff2).ID = Random.Range(0, max);
    }
Ejemplo n.º 2
0
    public LegacyBuff Clone()
    {
        LegacyBuff a = Instantiate(this);

        OnCreateClone(a);
        return(a);
    }
Ejemplo n.º 3
0
    /// <summary>
    /// Chua dinh nghia ham nay ma
    /// </summary>
    /// <param name="position"></param>
    /// <param name="level"></param>
    public static void LegacyBuff(Vector2 position)
    {
        BuffInGround prefab = Resources.Load <BuffInGround>(PathRewardBuff);
        LegacyBuff   b      = DataMap.GetLegacyBuff();

        if (prefab == null || b == null)
        {
            Debug.Log("Khong tin tai Prefab hoac Buff");
            return;
        }
        BuffInGround buff = Instantiate(prefab);

        buff.transform.position = position;
        buff.SetUp(b);
    }
Ejemplo n.º 4
0
 protected virtual void OnCreateClone(LegacyBuff clone)
 {
 }