Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding PCSpawner to correct branch #4

Open
wants to merge 12 commits into
base: player-spawning-and-placement
Choose a base branch
from
Open

Adding PCSpawner to correct branch #4

wants to merge 12 commits into from

Conversation

rick-wolf
Copy link

Created PCSpawner Singleton + Class
Player now a prefab and shouldn't exist between games
moved input handling to PCSpawner
Cleaned up player controller
All loading of winscreen now down by player's Die() (affects BigBaddieController too)
Extraneous commits due to merge issues... sorry!

Destroy(gameObject);
}
}

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some of the old code got mixed up with some of the new stuff. I'll do some surgery.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was always there. It resolved the issue of a shitload of players
spawning when level02 loaded. I admit i don't know why it helped, or if
it's still necessary though... Like I said, sometimes i just fix shit
without regard for best practice

On Fri, Aug 15, 2014 at 5:09 PM, zerosalife [email protected]
wrote:

In Assets/Scripts/Entities/Player/PlayerController.cs:

private Vector3 currentPosition;
public float moveSpeed = 1.5f;

  • void Awake() {
  • if(pcontrol == null) {
  •  DontDestroyOnLoad(gameObject);
    
  •  pcontrol = this;
    
  • } else if(pcontrol != this) {
  •  // There can be only one!
    
  •  Destroy(gameObject);
    
  • }
  • }

Looks like some of the old code got mixed up with some of the new stuff.
I'll do some surgery.


Reply to this email directly or view it on GitHub
https://github.com/zerosalife/okeanos/pull/4/files#r16318047.

@zerosalife
Copy link
Owner

I did some surgery and took the majority of your code. I merged it into the master branch. I was reluctant to pull in all of the changes to the binary stuff like Physics2DSettings

@rick-wolf
Copy link
Author

I couldn't figure out why 2dsettings kept changing. I just figured it was
changing in the same way OS files do, like .DS_Store or something

On Friday, August 15, 2014, zerosalife [email protected] wrote:

I did some surgery and took the majority of your code. I merged it into
the master branch. I was reluctant to pull in all of the changes to the
binary stuff like Physics2DSettings


Reply to this email directly or view it on GitHub
#4 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants