コード例 #1
0
ファイル: Bomb.cs プロジェクト: devforgood/engine
        public void InitFrom(Actor inShooter)
        {
            SetColor(inShooter.GetColor());
            SetPlayerId((int)inShooter.GetPlayerId());
            mParentNetworkId = inShooter.GetNetworkId();

            SetLocation(inShooter.GetLocation().Round());

            mDirection = inShooter.GetRotation();
        }
コード例 #2
0
ファイル: Projectile.cs プロジェクト: devforgood/engine
        public void InitFromShooter(Actor inShooter)
        {
            SetColor(inShooter.GetColor());
            SetPlayerId((int)inShooter.GetPlayerId());

            Vector3 forward = inShooter.GetForwardVector();

            SetVelocity(inShooter.GetVelocity() + forward * mMuzzleSpeed);
            SetLocation(inShooter.GetLocation());

            mDirection = inShooter.GetRotation();
        }