internal void Initialize(BulletSpawnData spawnData)
    {
        Id       = spawnData.Id;
        playerId = spawnData.PlayerId;

        isLocal = playerId == ConnectionManager.Instance.Client.ID;

        transform.position = spawnData.Position;
        Direction          = spawnData.Velocity;

        interpolation.Initialize(new BulletStateData(Id, playerId, 0, spawnData.Position));

        bulletController.Controller.enabled = true;

        isInitialized = true;
    }
Beispiel #2
0
 internal void Teleport(Vector3 position)
 {
     interpolation.Initialize(new PlayerStateData(id, 0, position, Quaternion.identity));
     transform.position = position;
 }