Exemple #1
0
        public void Trigger(ActionEvent ae, string eventName)
        {
            var spawnPos = ae.Origin.AnimationEvent.Position;
            var spawnRot = ae.Origin.AnimationEvent.Rotation;

            ProjectileFactory.SpawnProjectile(ae.Action.Entity, Data, ae.Position, spawnPos, spawnRot, ae.Action.Fx?.Value);
        }
        public void Fire(Vector3 targetPos)
        {
            var position = ShootPivot.Tr.position;

            ProjectileFactory.SpawnProjectile(this.GetEntity(), ProjectileId, targetPos, position, Quaternion.LookRotation(targetPos - position));
            ShootTimer.StartNewTime(ShootCooldown.Get());
        }