public PortalEntity() { Vision = new CustomType.Rect(); TargetPosition = new CustomType.Vector2(); }
private void _UpdateEffect(EntityInfomation entity) { var behavior = entity.Effect; var property = entity.Property; var obs = entity.Observed; CustomType.Rect bounds = new CustomType.Rect(); int skill = 0; if (behavior.TryGetBounds(ref bounds , ref skill)) { var s = GameData.Instance.FindSkill(skill); if (s != null) { if (s.Id == 1) { property.ChangeMode(); behavior.Hit(); } else if (s.Id == 2 ) { var inbrounds = _ObseverdInfomations.Query(bounds); var commanders = from e1 in inbrounds where e1.Id != entity.Id && e1.Commander != null select e1.Commander; foreach (var commander in commanders) { commander.Invoke(new BehaviorCommand.Injury(s.Param1, obs.Direction)); } if (commanders.Count() > 0) { behavior.Hit(); } } } } }
internal void SetCaptureRect(CustomType.Rect rect) { _InEffect = true; _Capture = rect; }