-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Huge Update: Object-Oriented Auto-Completion
+ Object-Oriented go to Declaration
- Loading branch information
Showing
16 changed files
with
726 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/** | ||
* Dynamic Arrays | ||
* ______________ | ||
* Dynamic arrays provide various ways for reading and manipulating the content and length of the array. | ||
* All of these must be done through variables or struct members, | ||
* dynamic arrays returned from functions must be assigned to a variable first. | ||
* | ||
* Declaration: var array<type> MyArray; | ||
* | ||
* NOTE: array<bool> is not a supported type! | ||
* | ||
* Dynamic arrays now support the foreach command to allow simple iterations. The basic syntax is: | ||
* foreach ArrayVariable(out ArrayItem, optional out ItemIndex) { ... } | ||
* | ||
* This is a non-existent class. You can't extend it. | ||
*/ | ||
class Array | ||
native; | ||
|
||
/** | ||
* The length of the array. | ||
*/ | ||
var native int Length; | ||
|
||
|
||
/** | ||
* Adds a item to the array. | ||
* | ||
* @param item - The item to add. | ||
*/ | ||
native final function AddItem( object item ); | ||
|
||
/** | ||
* Removes a specified item. | ||
* | ||
* @param item - The item to remove. | ||
*/ | ||
native final function RemoveItem( object item ); | ||
|
||
/** | ||
* Inserts a item at a specified index. | ||
* | ||
* @param index - The index to insert the item at. | ||
* @param count - The item to insert. | ||
*/ | ||
native final function InsertItem( int index, object item ); | ||
|
||
/** | ||
* Find and returns the found element with a specified value, if nothing is found it will return -1. | ||
* | ||
* @param value - The value to look for. | ||
* | ||
* @return The found index or -1 if value wasn't found. | ||
*/ | ||
native final function int Find( object value ); | ||
|
||
/** | ||
* Find and returns the found element with a specified value, if nothing is found it will return -1. | ||
* | ||
* @param propertyName - The property name of within a struct to test against. | ||
* @param value - The value to look for. | ||
* | ||
* @return The found index or -1 if value wasn't found. | ||
*/ | ||
native final function int Find( name propertyName, object value ); | ||
|
||
/** | ||
* Sorts the array. | ||
* | ||
* @param sortDelegate - The method to use for sorting. | ||
*/ | ||
native final function Sort( delegate sortDelegate ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/** | ||
* Class | ||
* _____ | ||
* In Unreal, classes are objects just like actors, textures, and sounds are objects. Class objects belong to the class named "class". | ||
* Now, there will often be cases where you'll want to store a reference to a class object, so that you can spawn an actor belonging to that class | ||
* (without knowing what the class is at compile-time). For example: | ||
* var() class C; | ||
* var actor A; | ||
* A = Spawn( C ); // Spawn an actor belonging to some arbitrary class C. | ||
* | ||
* When declaring variables that reference class objects, | ||
* you can optionally use the syntax class<metaclass> to limit the classes that can be referenced by the variable to classes of type metaclass (and its child classes). | ||
* For example, in the declaration: | ||
* var class<Actor> ActorClass; | ||
* The variable ActorClass may only reference a class that extends the "actor" class. | ||
* This is useful for improving compile-time type checking. For example, the Spawn function takes a class as a parameter, | ||
* but only makes sense when the given class is a subclass of Actor, and the class<classlimitor> syntax causes the compiler to enforce that requirement. | ||
* | ||
* As with dynamic object casting, you can dynamically cast classes like this: | ||
* // casts the result of SomeFunctionCall() a class of type Actor (or subclasses of Actor) | ||
* class( SomeFunctionCall() ) | ||
*/ | ||
class Class | ||
native; | ||
|
||
/** | ||
* Access a static function from this class instance. | ||
*/ | ||
var const native Specifier Static; | ||
|
||
/** | ||
* Access a default variable from this class instance. | ||
*/ | ||
var const native Specifier Default; | ||
|
||
/** | ||
* Access a constant from this class instance. | ||
*/ | ||
var const native Specifier Const; | ||
|
||
/** | ||
* Access a object from this class instance. | ||
*/ | ||
var const native Object Self; | ||
|
||
/** | ||
* Access a function from this class parent's instance. | ||
*/ | ||
var const native Specifier Super; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
WorldInfo.Game.Broadcast(${1:self}, ${2:Your message});]]></content> | ||
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | ||
<tabTrigger>broadcast</tabTrigger> | ||
<!-- Optional: Set a scope to limit where the snippet will trigger --> | ||
<scope>source.unrealscript</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
class $1 extends ${2:Simple}Game; | ||
class $1 extends ${2:SimpleGame}; | ||
$7 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<snippet> | ||
<content><![CDATA[ | ||
`log(${1:String or variable})]]></content> | ||
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | ||
<tabTrigger>log</tabTrigger> | ||
<!-- Optional: Set a scope to limit where the snippet will trigger --> | ||
<scope>source.unrealscript</scope> | ||
</snippet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"auto_complete_triggers": | ||
[ | ||
{ | ||
"characters": ".", | ||
"selector": "source.unrealscript" | ||
} | ||
], | ||
"auto_complete_with_fields": true | ||
} |
Oops, something went wrong.