예제 #1
0
        public override void Do(PlayerObject player)
        {
            var target = PhysicsUtility.Raycast <MovableComponent>
                         (
                player.Movable.Position + .1f * Constants.Directions[player.Movable.Direction],
                player.Movable.Direction,
                Constants.UnitMask,
                .6f
                         );

            if (target && target.CanMove(player.Movable.Direction))
            {
                target.Move(player.Movable.Direction);
            }
        }
예제 #2
0
파일: ParaPack.cs 프로젝트: mengtest/MyGame
        public void VerifyLandedPos()
        {
            if (isClientVerify)
            {
                return;
            }
            Vector3    tilePos = StreamerManager.GetTilePosition(currentPos);
            RaycastHit hit;

            if (PhysicsUtility.Raycast(tilePos, Vector3.down, height, LayerConfig.ParachuteMask, out hit))
            {
                isClientVerify = true;
                Vector3 hitRealpos = StreamerManager.GetRealPosition(hit.point);
                height = serverPos.y - hitRealpos.y;
            }
        }