Example #1
0
    private void CreatePlayerFromTemplate(AvatarTemplate template)
    {
        GameObject player = Instantiate(template.visuals, playerSpawnSpot.transform.position,
                                        playerSpawnSpot.transform.rotation);

        currentPlayer = player.AddComponent <Player>();
    }
Example #2
0
 private void HandleAvatarUpdated(AvatarTemplate template)
 {
     //TODO Optimize this
     Destroy(_currentAvatar);
     _currentAvatar = Instantiate(template.visuals, this.transform.position, this.transform.rotation);
 }
Example #3
0
 private void HandleAvatarSelected(AvatarTemplate template)
 {
     //TODO Optimize this
     Destroy(_currentAvatar);
 }
Example #4
0
 private void HandlePlayerSelected(AvatarTemplate template)
 {
     this.gameObject.SetActive(false);
     //TODO
     //Call the audio manager to play the avatar SFX
 }
Example #5
0
 private void HandleAvatarSelected(AvatarTemplate template)
 {
     CreatePlayerFromTemplate(template);
 }