Skip to content

Instantly share code, notes, and snippets.

View Gi133's full-sized avatar

Andreas Xirotyris Gi133

  • United Kingdom
View GitHub Profile
import maya.cmds as cmds
import maya.mel as mel
### Expression : python("Run("+frame+")"); ###
# GLOBAL VARIABLES
last_frame_number = 1
framerate = 0
global initialized
initialized = False
@Gi133
Gi133 / Army_Script.py
Created October 27, 2013 14:19
Make an army of boxes!
# Cube Army Script for Maya
# Imports
import maya.cmds
# Parameters
rows = 10
columns = 10
spacing = 1
soldier_height = 2
# For every soldier in the army
for z_position in range(columns):
@Gi133
Gi133 / Joint_Script.py
Last active December 26, 2015 16:49
Joint Control Shape Python Script for Maya
#Joint Control Shape Script
import maya.cmds as cmds
#Declarations and stuff
selected_joint_list = 0
name_stub = 0
offset_name = "_offset"
#Get all selected joints
selected_joint_list = cmds.ls("jnt_*", sl=True)
#If no joints were selected then let the user know
if selected_joint_list == 0:
@Gi133
Gi133 / Enemy.cpp
Created October 26, 2012 16:42
Graphics Programming Coursework Semester 1
#include "Enemy.h"
Enemy::Enemy(void)
{
}
Enemy::~Enemy(void)
{
@Gi133
Gi133 / Ballie.h
Created April 13, 2012 09:37
GBA Breakout!
// Ball|Game class (named Ballie for some odd and unfathomable reason)
class Ballie
{
private:
public:
//Variables:
int pos_x;
int pos_y;
@Gi133
Gi133 / Bullets.as
Created February 23, 2012 19:19
Flash game Assignment
package
{
import flash.display.Graphics;
import flash.display.Sprite;
/**
* Bullets probably need a home, this is their home!
* Currently only one type of ammo but with this class it's possible to add more if needed along with other kinds of munitions.
* On call it will take the gun's muzzle coordinates and set them as starting coords for the bullet.
* VARIABLE INFO:
@Gi133
Gi133 / main.cpp
Created February 22, 2012 14:34
Darts Class
//Darts 301
//Class version
#include <iostream>
#include <cstdlib>
#include <stdlib.h>
#include <string>
#include <time.h>z
#include <Windows.h>
@Gi133
Gi133 / bull.h
Created February 22, 2012 14:33
Darts Functions
void Bull(int& score, const int& player_accuracy)
{
// Player aims for 50 (bull) but there's a chance to miss and hit anything ranging from 1 to 20 if he does so.
int chance = (rand()%100)+1;
//State check
if (score == 50)
{
if (chance <= player_accuracy)
{
@Gi133
Gi133 / gist:1837191
Created February 15, 2012 16:43
Lab2
package
{
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextField;
import flash.geom.ColorTransform;
import flash.geom.Transform;
import flash.display.Shape;
import flash.events.MouseEvent;
import flash.events.KeyboardEvent;
@Gi133
Gi133 / classes.cpp
Created February 1, 2012 14:55
Darts Coursework
//Darts 301
//Class version
#include <iostream>
#include <cstdlib>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <Windows.h>