public override void OnBegin() { float Dir = _Direction.Evaluate(); DirectionVector = new Vector2(Mathf.Cos(Mathf.Deg2Rad(Dir)), Mathf.Sin(Mathf.Deg2Rad(Dir))); Timer = _Duration.Evaluate(); }
public override void Process(float delta) { base.Process(delta); if (ParentAgent != null) { if (_Clockwise.Evaluate()) { ParentAgent.Rotation += Mathf.Deg2Rad(_DegreesPerSecond.Evaluate()) * delta; } else { ParentAgent.Rotation -= Mathf.Deg2Rad(_DegreesPerSecond.Evaluate()) * delta; } } }
public float GetValue <TCard, TCardDefinition>(FieldRegion <TCard, TCardDefinition> fieldRegion) where TCard : CardBase <TCardDefinition> where TCardDefinition : CardDefinitionBase { var cards = fieldRegion.FindCards(cardDefinition: cardDefinition as TCardDefinition); var weight = weighting.Evaluate(fieldRegion); return((useCounters ? cards.Sum(c => c.Counters) : cards.Count) * weight); }
public override void Process(float delta) { base.Process(delta); if (ParentAgent != null) { ParentAgent.GlobalPosition += DirectionVector * _Speed.Evaluate() * delta; } if (Timer > 0.0f) { Timer -= delta; if (Timer <= 0.0f) { StopSelf(); } } }