Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
four
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
gadig
four
Commits
d57b5c78
Commit
d57b5c78
authored
Nov 17, 2016
by
Swado95
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wrote shootStuff Shoots stuff
parent
34a8216b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
Assets/Scripts/ShootSuff.cs
Assets/Scripts/ShootSuff.cs
+18
-0
No files found.
Assets/Scripts/ShootSuff.cs
0 → 100644
View file @
d57b5c78
using
UnityEngine
;
using
System.Collections
;
public
class
ShootSuff
:
MonoBehaviour
{
public
void
Shoot
(
GameObject
bul
,
Vector2
dir
,
float
force
=
1
)
{
GameObject
go
=
Instantiate
(
bul
,
transform
.
position
,
transform
.
rotation
)
as
GameObject
;
Rigidbody2D
rb2d
=
go
.
GetComponent
<
Rigidbody2D
>();
rb2d
.
AddForce
(
dir
*
force
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment