Closed ghost closed 9 years ago
Ok fixed it
Just realized I'm getting another error message and will try to fix that soon.
I need to check the code itself, but here is a start:
Rename:
./Assets/Sanji/Animations/kick.anim
./Assets/Sanji/Animations/kick.anim.meta
Just realized today these don't need renaming, they will be "renamed" when we swap to our new sprite hitboxes, which are under the correct folder name
./Assets/Sanji/Prefabs/HitBoxes/kick
./Assets/Sanji/Prefabs/HitBoxes/kick/kick1.prefab
./Assets/Sanji/Prefabs/HitBoxes/kick/kick1.prefab.meta
./Assets/Sanji/Prefabs/HitBoxes/kick/kick2.prefab
./Assets/Sanji/Prefabs/HitBoxes/kick/kick2.prefab.meta
./Assets/Sanji/Prefabs/HitBoxes/kick/kick3.prefab
./Assets/Sanji/Prefabs/HitBoxes/kick/kick3.prefab.meta
./Assets/Sanji/Prefabs/HitBoxes/kick/kick4.prefab
./Assets/Sanji/Prefabs/HitBoxes/kick/kick4.prefab.meta
./Assets/Sanji/Prefabs/HitBoxes/kick.meta
Delete (might need to re-add the hitboxes to HitBoxManager on Sanji.prefab if these are the ones used in HitBoxManager, but they are an extra copy): ./Assets/Sanji/HitBoxes/kick ./Assets/Sanji/HitBoxes/kick/kick1.prefab ./Assets/Sanji/HitBoxes/kick/kick1.prefab.meta ./Assets/Sanji/HitBoxes/kick/kick2.prefab ./Assets/Sanji/HitBoxes/kick/kick2.prefab.meta ./Assets/Sanji/HitBoxes/kick/kick3.prefab ./Assets/Sanji/HitBoxes/kick/kick3.prefab.meta ./Assets/Sanji/HitBoxes/kick/kick4.prefab ./Assets/Sanji/HitBoxes/kick/kick4.prefab.meta ./Assets/Sanji/HitBoxes/kick.meta
In code. I left the comment references here as well, since we might consider removing some that are "this kick is a placeholder for neutralheavy". Format is path:line_number:
./Assets/Character.cs:4: // kick is for now, we should replace with generics like neutralLight, neutralHeavy, and so on
./Assets/Character.cs:7: void kick(GameObject collider, GameObject hitter);
./Assets/PlayerMovement.cs:31: public string LIGHT_ATTACK; // future kick
./Assets/PlayerMovement.cs:32: public string HEAVY_ATTACK; // current kick
./Assets/PlayerMovement.cs:107: // if kicking, ignore user input, don't move
./Assets/PlayerMovement.cs:108: else if (anim.GetCurrentAnimatorStateInfo (0).IsName ("kick")) {
./Assets/PlayerMovement.cs:144: anim.SetTrigger("kick");
./Assets/PlayerMovement.cs:269: if (anim.GetCurrentAnimatorStateInfo (0).IsName ("kick")) {
./Assets/PlayerMovement.cs:270: character.kick (collider.transform.parent.gameObject, this.gameObject);
./Assets/Sanji.cs:5: public int kickDmg = 10; // all kicks deal the same dmg for now
./Assets/Sanji.cs:7: public void kick(GameObject collider, GameObject hitter) {
./Assets/Sanji.cs:8: // here we would apply damage unique to Sanji's kick
./Assets/Sanji.cs:18: collider.GetComponent
Granted, some of those files and lines in my two lists are already done, but those should be a full list of all files in our project with kick in its name as well as all references to kick in those files (omitting binaries).
Thanks, I'll start on this again at about 12:30
Just updated the file list a bit, I just realized all those prefabs shouldn't be renamed because they will be "renamed" when we swap to the new prefabs, which are all under the properly named folder and name.
On a neutral heavy kick I'm getting this message:
Where is the setHitBox function?
Going to come back to this in about a couple hours
There isn't one. It was replaced with functions like
public void setNeutralHeavyHitBox(ColliderManager.frames val) {
hitboxmanager.setCollider (ColliderManager.types.neutral_heavy, val);
}
Check each animation on the animations tab and make sure their function calls are changed. For example, first frame of the neutral_heavy animation should have the animation event function for setNeutralHeavyHitBox(frame1) and also setNeutralHeavyHurtBox(frame1). Note that animations with no hitboxes should only have a clearHitbox() on the first frame, which is just to make sure that when these animations without hitboxes start, that the old hitboxes are removed.
The generic setHitbox was replaced with the more specific setTypeHitBox because we needed to set hitboxes in the ColliderManager classes by type as well as frame for that type (i.e. neutral heavy and frame1), however the animation event functions only work with functions with only 1 argument. The multiple functions is the workaround, as we can use separate functions as the "type argument", and the only real argument used in the animation events is to specify the frame.
Also to explain the error, by saying there is no receiver and asking if you are missing a component, it means it cannot find a function by the name of setHitBox in any of the components attached to the object the animator is on.
I'm not seeing any function calls in the animation for neutral_heavy (renamed from kick) though
From your picture, you see that red line? Follow it up the sprite and you will see little grey diamonds, and above that even smaller white "arrows" pointing down. Those white arrows are the animation events. Right click them and then edit animation event and you will see the function that event is tied to.
Also I have no clue why unity makes those things so small and annoyingly hard to click. If you have multiple events on the same frame, the extras get even smaller... no idea who thought that was a good UI design.
Ohh, I had no idea those were there
Another thing I'm confused about. In the develop branch, there are 5 frames for the kick animation.And each of those frames have a call to setHitBox. But there are 4 frames that we actually have hit boxes for: kick1, kick2, kick3, and kick4. Shouldn't the last frame of the kick animation not have a call to setHitBox since we don't have a hitbox for it? And shouldn't there be some kind of error from that?
Ah nevermind, that was what clear was for
Alright I pushed some new changes. Going to check again that I renamed all the relevant things.
Is this done? Looks fine to me, other than moving HitBox to be sibling of the HurtBox folder (Sanji/Hitboxes -> Sanji/Prefabs/HitBoxes). Thought it is hitting on the neutral heavy issue, this will be fixed when we swap over to the new boxes and sprites, which I plan to do tomorrow since we have them from Tyler. If we could get this pulled so I could do that tomorrow, that would be awesome.
Removed the extra hitbox folder
The neutral_heavy animation got removed from the animator window for some reason. Going to fix that