Skip to content

Instantly share code, notes, and snippets.

View DanielSitarz's full-sized avatar

dieow DanielSitarz

  • Poland
View GitHub Profile
@DanielSitarz
DanielSitarz / MonoSingleton.cs
Created April 12, 2023 13:24 — forked from onevcat/MonoSingleton.cs
Mono singleton Class. Extend this class to make singleton component.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Mono singleton Class. Extend this class to make singleton component.
/// Example:
/// <code>
/// public class Foo : MonoSingleton<Foo>
/// </code>. To get the instance of Foo class, use <code>Foo.instance</code>
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
export default {
input: 'src/main.js',
output: {
file: 'public/bundle.js',
format: 'iife', // immediately-invoked function expression — suitable for <script> tags
sourcemap: true
},
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
robot.clone();
robot.turn(45);
robot.ahead(200);
robot.turn(85);
//FightCode can only understand your robot
//if its class is called Robot
var heIsThere = 0;
var Robot = function(robot) {
robot.rotateCannon(360);
robot.clone();
robot.turn(100);
};
@DanielSitarz
DanielSitarz / robot.js
Created December 4, 2012 15:43
SkyScream
//FightCode can only understand your robot
//if its class is called Robot
var pos = 0;
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;