Пример #1
0
    public void Pop(Explosion dart)
    {
        if (dart.props.HasFlag(DartProperty.Rinse))
        {
            props &= ~AntProperty.Camo;
            props &= ~AntProperty.Armor;

            UpdateType();
        }

        if (props.HasFlag(AntProperty.Camo) && !dart.props.HasFlag(DartProperty.Camo))
        {
            return;
        }

        if (dart.props.HasFlag(DartProperty.Flame))
        {
            effect = AntEffect.Flame;
            wetSystem.Stop();
            flameSystem.Play();
        }

        if (dart.props.HasFlag(DartProperty.Wet))
        {
            effect = AntEffect.Wet;
            flameSystem.Stop();
            wetSystem.Play();
            dps = dart.dps;

            stick = dart.stick;
        }

        Pop(dart.damage);
        dart.blast--;
    }
Пример #2
0
    public Ant SpawnAnt(AntType type, AntProperty props = AntProperty.None)
    {
        var obj = Instantiate(antPrefab, parent);

        obj.transform.position = checkpoints[0].position;

        var ant = obj.GetComponent <Ant>();

        ant.checkpoints = checkpoints;
        ant.props       = props;
        ant.type        = type;
        return(ant);
    }
 set => SetValue(AntProperty, value);