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--; }
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);