当前位置: 首页>>代码示例>>C#>>正文


C# CryEngine.Vec3类代码示例

本文整理汇总了C#中CryEngine.Vec3的典型用法代码示例。如果您正苦于以下问题:C# Vec3类的具体用法?C# Vec3怎么用?C# Vec3使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Vec3类属于CryEngine命名空间,在下文中一共展示了Vec3类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Equals_EqualVec3Objects_True

        public void Equals_EqualVec3Objects_True()
        {
            Vec3 v1 = new Vec3(1, 2, 3);
            Vec3 v2 = new Vec3(1, 2, 3);

            Assert.IsTrue(v1.Equals(v2));
        }
开发者ID:samneirinck,项目名称:cemono,代码行数:7,代码来源:Vec3Tests.cs

示例2: OnFire

        protected override void OnFire(Vec3 firePos)
        {
            var muzzleFlash = ParticleEffect.Get("weapon_fx.tank.tank125.muzzle_flash.muzzle_flash");
            muzzleFlash.Spawn(firePos, Attachment.Rotation.Column1, 0.5f);

            Owner.Physics.AddImpulse(-Attachment.Rotation.Column1 * impulseStrength);
        }
开发者ID:vblanco20-1,项目名称:AngryBoids,代码行数:7,代码来源:Heavy.cs

示例3: Launch

        public void Launch(Vec3 velocity)
        {
            ReceiveUpdates = true;
            state = BoidState.Launched;

            Physics.AddImpulse(velocity);
            OnLaunched(velocity);
        }
开发者ID:Vondoe90,项目名称:AngryBoids,代码行数:8,代码来源:AngryBoidBase.cs

示例4: NetSpawn

        public void NetSpawn(EntityId targetId, Vec3 pos)
        {
            var tank = Entity.Get<Tank>(targetId);

            tank.Position = pos;

            tank.OnRevive();
        }
开发者ID:vblanco20-1,项目名称:AngryBoids,代码行数:8,代码来源:SpawnPoint.cs

示例5: Vec3

        public void Vec3()
        {
            Vec3 vec3 = UnusedMarker.Vec3;
            Assert.True(UnusedMarker.IsUnused(vec3));

            vec3 = new Vec3(0, 250, 3);
            Assert.False(UnusedMarker.IsUnused(vec3));
        }
开发者ID:jbjhjm,项目名称:legendsofdrakan,代码行数:8,代码来源:UnusedMarkerTests.cs

示例6: OnRevive

        public override void OnRevive(EntityId actorId, Vec3 pos, Vec3 rot, int teamId)
        {
            var player = Actor.Get<Player>(actorId);

            if(player == null)
            {
                Debug.Log("[SinglePlayer.OnRevive] Failed to get the player. Check the log for errors.");
                return;
            }
        }
开发者ID:aquiball,项目名称:Seasons,代码行数:10,代码来源:SinglePlayer.cs

示例7: OnCollision

        protected override void OnCollision(EntityId targetEntityId, Vec3 hitPos, Vec3 dir, short materialId, Vec3 contactNormal)
        {
            if(Velocity.Length > VelocityToKill)
            {
                var particle = ParticleEffect.Get("explosions.barrel.explode");
                particle.Spawn(hitPos);

                Entity.Remove(Id);
            }
        }
开发者ID:Vondoe90,项目名称:AngryBoids,代码行数:10,代码来源:BaseEnemy.cs

示例8: OnCollision

 protected override void OnCollision(EntityId targetEntityId, Vec3 hitPos, Vec3 dir, short materialId, Vec3 contactNormal)
 {
     // Hit something, reset last event time.
     if(state == BoidState.Launched)
     {
         if(postFire == null)
             postFire = new DelayedFunc(OnStoppedMoving, 4000);
         else
             postFire.Reset();
     }
 }
开发者ID:Vondoe90,项目名称:AngryBoids,代码行数:11,代码来源:AngryBoidBase.cs

示例9: OnRevive

        public override void OnRevive(EntityId actorId, Vec3 pos, Vec3 rot, int teamId)
        {
            var cameraProxy = Actor.Get(actorId) as PlayerCamera;
            if(cameraProxy == null)
            {
                Debug.Log("[SinglePlayer.OnRevive] Failed to get the player proxy. Check the log for errors.");
                return;
            }

            cameraProxy.Init();
        }
开发者ID:jjiezheng,项目名称:AngryBoids,代码行数:11,代码来源:SinglePlayer.cs

示例10: OnCollision

        protected override void OnCollision(EntityId targetEntityId, Vec3 hitPos, Vec3 dir, short materialId, Vec3 contactNormal)
        {
            if (!Destroyed && targetEntityId!=0)
            {
                var breakageParams = new BreakageParameters();
                breakageParams.type = BreakageType.Destroy;
                breakageParams.fParticleLifeTime = 7.0f;
                breakageParams.bMaterialEffects = true;
                breakageParams.nGenericCount = 0;
                breakageParams.bForceEntity = false;
                breakageParams.bOnlyHelperPieces = false;

                breakageParams.fExplodeImpulse = 10.0f;
                breakageParams.vHitImpulse = dir;
                breakageParams.vHitPoint = hitPos;

                Physics.Break(breakageParams);

                SetSlotFlags(GetSlotFlags() | EntitySlotFlags.Render);

                Destroyed = true;
            }
        }
开发者ID:jjiezheng,项目名称:AngryBoids,代码行数:23,代码来源:DestroyableEntity.cs

示例11: SetRotationAA

 public void SetRotationAA(float c, float s, Vec3 axis, Vec3 t = default(Vec3))
 {
     this = new Matrix34(Matrix33.CreateRotationAA(c, s, axis));
     M03 = t.X; M13 = t.Y; M23 = t.Z;
 }
开发者ID:PoppermostProductions,项目名称:CryMono,代码行数:5,代码来源:Matrix.cs

示例12: OnCollision

 /// <summary>
 /// Sent on entity collision.
 /// </summary>
 protected virtual void OnCollision(ColliderInfo source, ColliderInfo target, Vec3 hitPos, Vec3 contactNormal, float penetration, float radius)
 {
 }
开发者ID:RogierWV,项目名称:315GR,代码行数:6,代码来源:Actor.cs

示例13: Scale

 /// <summary>
 /// apply scaling to matrix.
 /// </summary>
 /// <returns></returns>
 void Scale(Vec3 s)
 {
     M00 *= s.X; M01 *= s.Y; M02 *= s.Z;
     M10 *= s.X; M11 *= s.Y; M12 *= s.Z;
     M20 *= s.X; M21 *= s.Y; M22 *= s.Z;
 }
开发者ID:PoppermostProductions,项目名称:CryMono,代码行数:10,代码来源:Matrix.cs

示例14: TransformVector

 /// <summary>
 /// transforms a vector. the translation is not beeing considered
 /// </summary>
 /// <param name="p"></param>
 /// <returns></returns>
 public Vec3 TransformVector(Vec3 p)
 {
     return new Vec3(M00 * p.X + M01 * p.Y + M02 * p.Z + M03, M10 * p.X + M11 * p.Y + M12 * p.Z + M13, M20 * p.X + M21 * p.Y + M22 * p.Z + M23);
 }
开发者ID:PoppermostProductions,项目名称:CryMono,代码行数:9,代码来源:Matrix.cs

示例15: QuatT

 public QuatT(Vec3 t, Quat q)
 {
     Q = q;
     T = t;
 }
开发者ID:rookboom,项目名称:CryMono,代码行数:5,代码来源:QuatT.cs


注:本文中的CryEngine.Vec3类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。